GTAG - Modding - Opcode Database - 0A9A
Opcode Database
0A9A
Description | Opens the file for reading and writing. This opcode can be used as a condition: if the file is was not open, it returns False, otherwise True. Parameters: 1 = variable to store the file handle 2 = file name. If the path is relative, the file is open in accordance with the current directory (opcode 0A99). 3 = file open mode: 0x6272 - opens binary file for reading 0x72 - opens text file for reading 0x6277 - opens binary file for writing 0x77 - opens text file for writing CLEO 4 Specialities CLEO 4 simplifies the task of setting the mode using standard methods. You can replace the mode parameter with a string to specify the opening mode. If you don't use a string, the CLEO 3 opening mode will be used. "rb" = read binary file "wb" = write binary file "wb+" = write binary file (create it if it doesn't exist) "ab" = append binary file (write at the end) "ab+" = append binary file (create it if it doesn't exist) "rt" = read text file "wt" = write text file "wt+" = write text file (create it if it doesn't exist) "at" = append text file "at+" = append text file (create it if it doesn't exist) "rb+" = read/write binary file "rt+" = read/write text file |
---|---|
Parameters (v2) | 1) File path (Long String) (STRING) 2) Integer (INT) 3) (Returned) File handle (Integer) (INT) |
Games | |
Category | CLEO 3 |
San Andreas | |
sascm.ini | 0A9A=3, open_file %1s% mode %2d% store_to %3d% |
Example | 0A9A: open_file "settings.ini" mode 0x72 store_to 0@ |
Command Name | OPEN_FILE |