AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Adding the remainder of 2 variable to another variable? (https://forums.alliedmods.net/showthread.php?t=131525)

GXLZPGX 07-06-2010 03:12

Adding the remainder of 2 variable to another variable?
 
Am I going about it correctly?

PHP Code:

new 5
new 2
new 5
new 


SnoW 07-06-2010 08:07

Re: Adding the remainder of 2 variable to another variable?
 
Not exactly. What you are doing is initializing a new variable with the sum of an existing variable and a remainder of two other variables.

Adding the remainder of two variables to another variable would be:
PHP Code:

+= c


GXLZPGX 07-06-2010 12:58

Re: Adding the remainder of 2 variable to another variable?
 
Quote:

Originally Posted by SnoW (Post 1229749)
Not exactly. What you are doing is initializing a new variable with the sum of an existing variable and a remainder of two other variables.

Adding the remainder of two variables to another variable would be:
PHP Code:

+= c


Oh wow, I'm surprised I didn't think of that. Thank you.


All times are GMT -4. The time now is 07:12.

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