Jump to content

2 then in 1 if


Recommended Posts

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

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

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...