"Else If" it does not work ?

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
Vertex
Posts: 108
Joined: Fri May 22, 2015 1:01 am
Location: Colombia
Contact:

"Else If" it does not work ?

Post by Vertex »

Code: Select all

if ( variable =  10 )
{
 debug("Ok");
}
else if (variable = 100)
{
			
  debug("bad");
}
http://www.iris3dgames.com Reality Factory Spanish :wink:
Allanon
Posts: 493
Joined: Mon Aug 29, 2005 8:23 am

Re: "Else If" it does not work ?

Post by Allanon »

Code: Select all

if ( variable =  10 )
{
    debug("Ok");
}
else
{
    if (variable = 100) 
    {     
       debug("bad");
    }
}
or

Code: Select all

switch(variable)
{
    case 10
    {
        debug("Ok");
    }
    case 100
    {
        debug("bad");
    }
}
Simkin Statements
Post Reply