vladvo Posted October 4, 2022 Share Posted October 4, 2022 (edited) I need to store coordinates to a file. Writing to INI is not convenient. Each set of coordinates should be on separate line. 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] 0172: [email protected] = actor $PLAYER_ACTOR Z_angle 0A9A: $hFILE = open_file "cleo\file.dat" mode "at+" 0AD9: write_formatted_text "%f %f %f %f " in_file $hFile [email protected] [email protected] [email protected] [email protected] 0xA 0A9B: close_file $hFILE I tried everything - 0xA, 0xD, 1, 4, 0x0A, 0x0D - it just doen't work. This script is run on keypress and the next set of coordinates is written to the same line. How to make 'carriage return' ? Sanny is set to 'as is' in options menu. Moving 0A9A outside the loop, not closing the file - nothing helps. =========================== Solution. Found an example on gtamods opcode wiki. The line should look like that: 0AD9: write_formatted_text "%f %f %f %f%c" in_file $hFile [email protected] [email protected] [email protected] [email protected] 0xA Notice the %c in the line. As far as I understand - it is required to accept the 0xA option. 0xA is a symbol, afaik. Well, solved. ) Edited October 5, 2022 by vladvo Solved Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now