Jump to content
  • 0

How make Multi task


MasterC
 Share

Question

hi guys, i need help

 

i need make a command for more 2 option (or)

example

i tryed it, work only first state1

 

if state1 or state2 == off then
gg.alert('error, activate  state1 and state2 to continue')

 

please help me how do

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1
if (state1 == "off") or (state2 == "off") then
  gg.alert('error, activate  state1 and state2 to continue')
end

You need to test on both side, and you can infinitely chain the "or"

And one thing i wanted to point out is, why you want to use two different options to activate one thing ?, are there any benefit from this ?

Edited by MAARS
Link to comment
Share on other sites

  • 0
On 5/29/2023 at 6:24 PM, MAARS said:
if (state1 == "off") or (state2 == "off") then
  gg.alert('error, activate  state1 and state2 to continue')
end

You need to test on both side, and you can infinitely chain the "or"

And one thing i wanted to point out is, why you want to use two different options to activate one thing ?, are there any benefit from this ?

i try other method and work here

 

if (state1==off or (state2==off)) then

 

 

thanks..

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.