SA-MP Forums Archive
[SOLVED]Variables - Urgent! - 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: [SOLVED]Variables - Urgent! (/showthread.php?tid=111338)



[SOLVED]Variables - Urgent! - pagie1111 - 01.12.2009

Okay, i know that if you use say

pawn Код:
new Point = 0;
then later on in your script you use

pawn Код:
Point++;
to plus it by one.

My question is how would I go about adding or subtracting like 5 without making another variable.

Example:

pawn Код:
new current = Point;
Point = current + 5;
or

pawn Код:
Point = Point + 5;
Help is much appreciated.

EDIT: I solved my own problem by accident.

pawn Код:
Point += 5;

or

Point -= 5;
Thanks anyway.