How to read a single value from a file with Y_INI? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to read a single value from a file with Y_INI? (
/showthread.php?tid=273030)
How to read a single value from a file with Y_INI? -
Whizion - 31.07.2011
I know that it was designed to read whole files but sometimes you just don't need that.
I would need something like this: GetValueFromFile(file[], name[]);
And then you do something like: GetValueFromFile("Someone's_Account", "Score"); and the function would return the value of Score.
Could you help me make that function? Or at least provide some advice?
Thank you.
Re: How to read a single value from a file with Y_INI? -
Dr - 31.07.2011
Just load all the things from that players account and assign arrays to them, so you can refer back to the score, so on. Pretty much a simple loading and saving system.
Re: How to read a single value from a file with Y_INI? -
Kush - 31.07.2011
Be more specific, are you talking about loading a value from a file?
Re: How to read a single value from a file with Y_INI? -
Whizion - 31.07.2011
@Dr, yes that could be a possible solution, but 1 variable is simpler
@kush, Yes.
---------------------------
BUMP.
Re: How to read a single value from a file with Y_INI? -
Whizion - 21.08.2011
BUMP.
AW: How to read a single value from a file with Y_INI? -
Nero_3D - 22.08.2011
There is no other methode with y_ini
Even is there were it would be a waste if you use it more as once in a row