[Help] Dini Set - 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: [Help] Dini Set (
/showthread.php?tid=79589)
[Help] Dini Set -
borisblat - 29.05.2009
why when i do this :
dini_Set(dinipath, "car", "%d" , i-100);
under the key car it doing %d and not the number?
Re: [Help] Dini Set -
Sdhoirm - 29.05.2009
Quote:
Originally Posted by borisblat
why when i do this :
dini_Set(dinipath, "car", "%d" , i-100);
under the key car it doing %d and not the number?
|
Try:
pawn Код:
new Car[3];
format(Car,sizeof(Car),"%d",i-100);
dini_Set(dinipath,"car",Car);
Re: [Help] Dini Set -
Weirdosport - 29.05.2009
You obviously don't know the format dini takes:
dini_Set(filename[], key[], value[])
In your case, I think you're after:
dini_IntSet(filename[], key[], value)
dini_IntSet(dinipath, "car", i-100)
EDIT: Previous posters solutions saves it as a string, mine saves it as an integer... =/ s'up to you.