no_messiah 0 Posted April 1, 2005 allright i have an if stament that goes like this If $cast = $castmax And $mode = 1 Then $medi = 0 And $mode = 2 how ever mode does never get set to 2 does any one know why? Share this post Link to post Share on other sites
SlimShady 1 Posted April 1, 2005 A one-line If statement can only perform one action if the statement is true. So if you want to perform multiple actions and perhaps also an "Else" action, use a multi-line If statement. If $cast = $castmax And $mode = 1 Then $medi = 0 $mode = 2 Else ;Statement is false. Perform actions here... EndIf Share this post Link to post Share on other sites
no_messiah 0 Posted April 1, 2005 A one-line If statement can only perform one action if the statement is true.So if you want to perform multiple actions and perhaps also an "Else" action, use a multi-line If statement.If $cast = $castmax And $mode = 1 Then $medi = 0 $mode = 2 Else ;Statement is false. Perform actions here... EndIf<{POST_SNAPBACK}>yeah i kinda figured that but will that work in a while Share this post Link to post Share on other sites
Blue_Drache 260 Posted April 1, 2005 yeah i kinda figured that but will that work in a while<{POST_SNAPBACK}>While 1 Sleep(10) If $cast = $castmax And $mode = 1 Then $medi = 0 $mode = 2 Else ;Statement is false. Perform actions here... EndIf WEndworks just fine. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Share this post Link to post Share on other sites