cool. very simple, with script documentation just like treyarch's utility functions. can you teach me what the % symbol does again?
cool. very simple, with script documentation just like treyarch's utility functions. can you teach me what the % symbol does again?
Modulus? Its the remainder when dividing.
It returns the modulo of the division. So for example:
10 % 2 returns 0 (as 10/2=5, not a double/float but an integer)
9 % 2 returns 1 (as 9/2 returns a double/float, 8/2 doesn't. 9-8 = 1, so 1 is the answer)
19 % 4 returns 3 (as 19/4 returns a double/float, 16/4 doens't. 19-16=3, so 3 is the answer)
Bad explaination but it works this way. It'll check how much times the number after the % can be in the number before the %, and it'll return the rest (the number before the % minus the number of the last time the number after % could be inserted)
Modulus? Its the remainder when dividing.ive always thought that modulus (%) wasnt in GSC well now i know it is :D
10/10 variable names by the way.Haha ya, nothing like using keywords as your own variables.
Maybe should just cast the int as an actual int.
int = int(int);
10/10 variable names by the way.
(Just in case someone passes a double.)
Haha ya, nothing like using keywords as your own variables.
To my knowledge, int is not a keyword in GSC. The reason its highlighted in the code box is probably because its set to highlight C language keywords, which GSC is based off of.You would be correct, but it is still bad practice to do so.
You would be correct, but it is still bad practice to do so.
Woah dude, why are you attacking Leviathan?
I couldn't care less what happens in developer mode as long as it runs fine for everyone
e - besides Awesome Pieman did the majority of scripting for Leviathan and he doesn't know proper scripting practices since he is self taught.
I would also like to counter your argument with why would Treyarch allow you to use undefined variables in the first place (ie the isDefined function, which is quite handy) without them actually working.