SA-MP Forums Archive
increase variable? - 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: increase variable? (/showthread.php?tid=386276)



increase variable? - PawnoQ - 19.10.2012

hi,

can i increase a variable like that correctly?

pawn Код:
drugamount[playerid]=drugamount[playerid]+NewAmount;
thanks


Re: increase variable? - Simplyfrag - 20.10.2012

hmm i think you can


Re: increase variable? - ReneG - 20.10.2012

or

drugamount[playerid] += NewAmount;


Re: increase variable? - PawnoQ - 20.10.2012

thanks, but my way is also possible right?
I know it is in C but i dont know if it is for pawno too


Re : increase variable? - lelemaster - 20.10.2012

Yes it is.


Re: increase variable? - cessil - 20.10.2012

please test the script and read the wiki before creating a thread.