Y_ini and loading coordinates.
#1

Hi everyone, I am currently working on the loading part of my Race System. I am trying to load data using Y_ini and everything load fine (debug) except the coordinates.

I am saving them like so: Checkpoint0 = 1000.0000,1111.0000,1222.0000

In what I am supposed to load them, String, Float or what?

Thank you!
Reply
#2

When loading coordinates, you must use Float

pawn Код:
INI_Float ( ... ) // examle, I don't really use Y_INI.
Reply
#3

I tried, is not loading the script then for some reason.

pawn Код:
new Float:test;
INI_Float("Checkpoint0", test);
Reply
#4

To load it, do the opposite of what you did to save it.
Reply
#5

The problem is I haven't create any saving system yet. I am planning to create an Ingame Race builder but first I want to create the loading system.
Reply
#6

You could take it as a string , and just split it out.
https://sampwiki.blast.hk/wiki/Code_Snippets#Split
Reply
#7

I just figure out that my code had the problem and it wasn't loading. Still thanks to everyone that tried
Reply
#8

Why would you create the load part before creating the save part?
Reply
#9

Because the saving part will be the easiest one.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)