no_messiah Posted April 1, 2005 Share 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? Link to comment Share on other sites More sharing options...
SlimShady Posted April 1, 2005 Share 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 Link to comment Share on other sites More sharing options...
no_messiah Posted April 1, 2005 Author Share 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 Link to comment Share on other sites More sharing options...
Blue_Drache Posted April 1, 2005 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now