Game Development Community

Question about local variables...

by Jesse Hall · in Torque Game Builder · 08/23/2005 (5:24 pm) · 2 replies

Is this not working becuase %random and the string "totaly awesome" are evaluated as 0?



%random = "random";
  

        if ( %random == "totaly awesome" )

               {

                 echo ( "oh crap!!" );

               }



Im gonna do a search for how to compare strings now but can someone explain why this works the way it does?

#1
08/23/2005 (5:29 pm)
You compare strings like this:
if(%random $= "totaly awesome")
#2
08/23/2005 (5:30 pm)
Thank you!