Game Development Community

If

by Skylar Kelty · in Torque Game Engine · 05/18/2006 (1:58 pm) · 2 replies

Hi,

Sorry for posting so soon after the last but i realy need help

I'm trying to work out the 'if' statement
I have:

$Game::Name = "DawnOfMen";

if ( $Game::Name !$= "DawnOfMen" ) {
echo("--------- Initializing DawnOfMen ---------");
}
else
echo("--------- Define name type! ---------");

It always outputs
"--------- Define name type! ---------"
and never
"--------- Initializing DawnOfMen ---------"

Why?
I must be doing something wrong

Thanks in advance

#1
05/18/2006 (2:00 pm)
Change:

if ( $Game::Name !$= "DawnOfMen" ) {

to:

if ( $Game::Name $= "DawnOfMen" ) {

Using the exclamation point infront means not equal to, instead of equal to.
#2
05/18/2006 (2:07 pm)
Thanks a lot, works great now :)