Game Development Community

Question about local variables...

by Jesse Hall · in Torque Game Builder · 08/24/2005 (12:24 am) · 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/24/2005 (12:29 am)
You compare strings like this:
if(%random $= "totaly awesome")
#2
08/24/2005 (12:30 am)
Thank you!