Difference between revisions of "0A9A"

From GTAMods Wiki
Jump to navigation Jump to search
m
m
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
 
| syntax1    = 0A9A: [''var''] = openfile "[''string1'']" mode "[''string2'']"
 
| syntax1    = 0A9A: [''var''] = openfile "[''string1'']" mode "[''string2'']"
 
| syntax2    = 0A9A: [''var''] = openfile "[''string1'']" mode [''int'']
 
| syntax2    = 0A9A: [''var''] = openfile "[''string1'']" mode [''int'']
| p1t        = [''var'']
+
| p1t        = [''string1'']
| p1d         = Variable to store the handle of the file
+
| p1d        = File name (if using relative path, it is relative to game's directory)
| p2t        = [''string1'']
+
| p2t         = [''string2'']
| p2d         = File name (if using relative path, it is relative to game's directory)
+
| p2d         = Mode (see <code>[http://en.cppreference.com/w/cpp/io/c/fopen fopen]</code> for explanation)
| p3t         = [''string2'']
+
| p3t        = [''var'']
| p3d         = Mode (see <code>[http://en.cppreference.com/w/cpp/io/c/fopen fopen]</code> for explanation)
+
| p3d        = Variable to store the handle of the file
 
| p4t        = [''int'']
 
| p4t        = [''int'']
 
| p4d        = Mode, e.g. "r" is 0x72, "rb" is 0x6272
 
| p4d        = Mode, e.g. "r" is 0x72, "rb" is 0x6272
Line 15: Line 15:
  
 
This [[CLEO]] opcode opens the file. It is also conditional, returning true if the file exists.
 
This [[CLEO]] opcode opens the file. It is also conditional, returning true if the file exists.
 +
 +
== Example ==
 +
:''See [[0AD9#Example]], [[0ADA#Example]]''
 +
 +
== Keywords ==
 +
open, file, openfile
  
 
[[Category:CLEO Opcodes]]
 
[[Category:CLEO Opcodes]]

Latest revision as of 04:33, 18 January 2017

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
[string1]
File name (if using relative path, it is relative to game's directory)
[string2]
Mode (see fopen for explanation)
[var]
Variable to store the handle of the file
[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.

Example

See 0AD9#Example, 0ADA#Example

Keywords

open, file, openfile