Increase variable by 1?
#1

If I make a variable called poop = 0
how can I make this number to increase by 1(+1)

thanks
Reply
#2

pawn Код:
poop++;
or
pawn Код:
poop += 1;
or
pawn Код:
poop = poop + 1;
Reply
#3

These codes increase by 1.
Код:
poop++;
Код:
poop += 1;
Код:
poop = poop+1;
These codes increase by 2.
Код:
poop += 2;
Код:
poop = poop+2;
These codes increase by 3.
Код:
poop += 3;
Код:
poop = poop+3;
These codes decrease by 1.
Код:
poop--;
Код:
poop -= 1;
Код:
poop = poop-1;
These codes decrease by 2.
Код:
poop -= 2;
Код:
poop = poop-2;
These codes decrease by 3.
Код:
poop -= 3;
Код:
poop = poop-3;
Reply
#4

Ty so if I want After a connect let THE number be 1 I have to do on init poop = 0 so the ++ will make it 1?
Reply
#5

Quote:
Originally Posted by hipy
Ty so if I want After a connect let THE number be 1 I have to do on init poop = 0 so the ++ will make it 1?
Yes.
If you use poop = 15;
++ will make it 16.

16 --> 17
183 --> 184
etc.
Reply
#6

Thanks!!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)