AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Whats the difference between ++ and += (https://forums.alliedmods.net/showthread.php?t=134930)

GXLZPGX 08-10-2010 09:50

Whats the difference between ++ and +=
 
When adding to a variable, what is the difference between:

Variable[id]++

and

Variable[id]+=

I believe ++ adds 1 automatically each time, but += allows you to define how much to add each time, correct?

hleV 08-10-2010 09:55

Re: Whats the difference between ++ and +=
 
Yes.

Leon M. 08-10-2010 12:26

Re: Whats the difference between ++ and +=
 
http://wiki.amxmodx.org/Pawn_Tutorial#Expressions

wrecked_ 08-10-2010 16:11

Re: Whats the difference between ++ and +=
 
www.google.com

Flipper_SPb 08-10-2010 16:16

Re: Whats the difference between ++ and +=
 
Equivalents:

Variable[id] = Variable[id] + 1

and

Variable[id] = Variable[id] + x


All times are GMT -4. The time now is 21:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.