Little error - 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: Little error (
/showthread.php?tid=375875)
Little error -
Euan Hughes - 08.09.2012
So I have this error, I am trying to solve this, but I just cant.
pawn Код:
new price;
format(DCars[id][Price], 255, "%s", price);
dini_IntSet(filestring, "Price", DCars[id][Price]);
For example if I make the price ... 10000 and then i check in script files it will only show 2 - 3 numbers and they will be completely different.
And when a 3d text label is there it shows random things .. I just dont know how to fix it..
Please help
Thanks
Re: Little error -
clarencecuzz - 08.09.2012
Код:
format(DCars[id][Price], 10, "%d", price);
Otherwise,
Код:
DCars[id][Price] = price;
Assuming that the variable 'price' is in digit form, not string form.
Re: Little error -
Euan Hughes - 08.09.2012
Quote:
Originally Posted by clarencecuzz
Код:
format(DCars[id][Price], 10, "%d", price);
Otherwise,
Код:
DCars[id][Price] = price;
Assuming that the variable 'price' is in digit form, not string form.
|
Still did not work
Please help
Thanks
Re: Little error -
vIBIENNYx - 08.09.2012
Because you're saving an integer as a string, on this line:
pawn Код:
dini_IntSet(filestring, "Price", DCars[id][Price]);
Change it to
pawn Код:
dini_IntSet(file, "Price", DCars[id][Price]);
Re: Little error -
Euan Hughes - 22.08.2013
Thanks.