Sign in to follow this  
Followers 0
no_messiah

2 then in 1 if

4 posts in this topic

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



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

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

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
WEnd

works just fine.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0