Difference between revisions of "0A9A"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "{{OpCode | games = {{Icon|t}} (with CLEO) | description = Opens the file | syntax1 = 0A9A: [''var''] = openfile "[''string1'']" mode "[''string2'']" | syntax2...")
 
m
Line 11: Line 11:
 
| p3d        = Mode (see <code>[http://en.cppreference.com/w/cpp/io/c/fopen fopen]</code> for explanation)
 
| p3d        = Mode (see <code>[http://en.cppreference.com/w/cpp/io/c/fopen fopen]</code> for explanation)
 
| p4t        = [''int'']
 
| p4t        = [''int'']
| p4d        = Mode, e.g. "r" is 0x72, "rb" is 0x6277
+
| p4d        = Mode, e.g. "r" is 0x72, "rb" is 0x6272
 
}}
 
}}
  

Revision as of 20:03, 16 September 2016

GTA III Vice City San Andreas (with CLEO)


Description
Opens the file
Syntax
0A9A: [var] = openfile "[string1]" mode "[string2]"
0A9A: [var] = openfile "[string1]" mode [int]
Parameter
[var]
Variable to store the handle of the file
[string1]
File name (if using relative path, it is relative to game's directory)
[string2]
Mode (see fopen for explanation)
[int]
Mode, e.g. "r" is 0x72, "rb" is 0x6272

This CLEO opcode opens the file. It is also conditional, returning true if the file exists.