Posts: 76
Threads: 5
Joined: Jun 2012
Reputation:
0
How would you save the player's coordinates?. I like using a string because I can save everything in just one line instead of using 4 different variables.
(And yes, the quotation mark following "money" was a mistake that I made during the post, it wasn't like that in the script)
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
Save each coordinate on a new line as a float. I'm sure you like it that way, but you should prefer efficiency over preferred styles unless both styles have equal efficiency (which I doubt in this case).
Posts: 76
Threads: 5
Joined: Jun 2012
Reputation:
0
Why is it more efficient to save them each individually? I still sscanf them as a floats when I need to use them, is it somehow "faster" to just have them in their own variable? I feel like I save more space both in the .ini file and in the script by using strings, but I'm willing to change them if understand why that isn't the most efficient way to do it.
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
Exactly that. You have to split the string in different values first before you can handle them individually while if you were to handle them individually in the first place, then the splitting of the string won't be needed any more. Then again, I'm unsure whether or not your method is truly less efficient than the method I use. Considering my logic in the beginning of this post, I believe it is slightly more efficient. Though, if the efficiency difference is minimal, then you won't have to worry about it. I'll work on a script to compare both methods in efficiency. As for now, take my advice with a pinch of salt.