Difference between revisions of "0A9A"
Jump to navigation
Jump to search
m |
|||
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 = ['' | + | | p1t = [''string1''] |
− | | p1d | + | | p1d = File name (if using relative path, it is relative to game's directory) |
− | + | | p2t = [''string2''] | |
− | + | | p2d = Mode (see <code>[http://en.cppreference.com/w/cpp/io/c/fopen fopen]</code> for explanation) | |
− | | | + | | p3t = [''var''] |
− | | | + | | 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 |
Revision as of 00:58, 20 November 2016
(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.