Page 1 of 1

"Else If" it does not work ?

Posted: Sat Jun 13, 2015 12:55 am
by Vertex

Code: Select all

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

Re: "Else If" it does not work ?

Posted: Sat Jun 13, 2015 6:39 am
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