Jump to content
  • 0

How make Multi task


MasterC

Question

Posted

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

 

2 answers to this question

Recommended Posts

Posted
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 ?

Posted
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..

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.