How do I check if an integer is uninitializer

The Undaddy

Creating with the power of rage
Reaction score
55
or is equal to -1?Main problem is the first part.

And no, I have not tried doing it myself, I'm off to school in 15 minutes :rolleyes:

Edit: uninitializeD
 

The Undaddy

Creating with the power of rage
Reaction score
55
Yeah well...
My question is more kind of checking it in-game.
You know when warcraft is running :D
 

Rushhour

New Member
Reaction score
46
there is no "correct" way for checking that, but you can simply
set i=i+1 (or any function call with an uninitialized variable, like SetUnitX(u,0.) )
will cause the thread to break. So if the code after that line isn't executed the variable is unitialized. (and for example a global boolean not set to true to check it from another function)

But this is really... not a nice way of doing it. initialize with "null" or 0 and use normal if then elses ;P
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top