Bool in Fini/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)
+--- Thread: Bool in Fini/Ini (
/showthread.php?tid=357282)
Bool in Fini/Ini -
Roko_foko - 06.07.2012
What function should I use if I want to write in a .ini file a bool variable?
Re: Bool in Fini/Ini -
coole210 - 06.07.2012
Maybe try to format the variable before saving it and after loading it?
pawn Код:
//Saving:
new Formatted_Variable = 0;
if(Variable == true) Formatted_Variable = 1;
//Loading:
if(Loaded_Variable == 1) Variable = true; else Variable = false;
Untested, but should work.
Re: Bool in Fini/Ini -
Roko_foko - 07.07.2012
I know that, but what's the point of doing that, instead of bool variable I can use a normal one and no problem. But to spare some memory I am using this one. There is no point of doing that if you have to delcare a new one to save and load :/. I think some changes are needed. Ima do it my self xD