Integer even or odd?

Status
Not open for further replies.
Level 4
Joined
Jul 11, 2007
Messages
82
How can I find if an integer (a unit's custom value) is even or odd? I want to do something like this:

JASS:
if (GetUserData(GetTriggerUnit)) is even then
     call 
else //it's odd
     call
endif
 
ModuloInteger or ModuloReal.

JASS:
if ModuloReal(yourdatahere, 2)==0 then yourdatahere is even
else yourdatahere is NOT even
 
Status
Not open for further replies.
Back
Top