Logic Machine Forum
Help - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Help (/showthread.php?tid=934)



Help - kostal.borek - 09.08.2017

Hi all, please help, I have a script with two conditions and I need the script to start working if the first condition is false and the other true. For example...

Twilight = grp.getvalue("9/1/2") 
ObjA = grp.getvalue("9/2/100")  

if Twiligt false and ObjA == true then

Where am I making a mistake?

Thanks


RE: Help - buuuudzik - 09.08.2017

You can do something like this:

Code:
if twilight == true or objA == true then
-- do something
end

or shorter way:

Code:
if twilight or objA then
-- do something
end



RE: Help - kostal.borek - 09.08.2017

to Buuuudzik
I know, but I need to judge both conditions at once so one will be false and the other true...


RE: Help - buuuudzik - 09.08.2017

(09.08.2017, 20:23)kostal.borek Wrote: to Buuuudzik
I know, but I need to judge both conditions at once so one will be false and the other true...

If I understand right you want doing something when this 2 values will be opposite? If yes below script should be enough:
Code:
if twilight ~= objA then
-- do something
end



RE: Help - CHOUAIBOU - 10.08.2017

(09.08.2017, 18:26)kostal.borek Wrote: Hi all, please help, I have a script with two conditions and I need the script to start working if the first condition is false and the other true. For example...

Twilight = grp.getvalue("9/1/2") 
ObjA = grp.getvalue("9/2/100")  

if Twiligt false and ObjA == true then

Where am I making a mistake?

Thanks

Hi Kostal,
First make sure that 9/1/2 and 9/2/100 are booleans. Then try this :

Code:
Twilight = grp.getvalue('9/1/2')
ObjA = grp.getvalue('9/2/100')  

if (Twiligt == false and ObjA == true) then
--do something
end


Chouaibou.


RE: Help - kostal.borek - 16.08.2017

Hi, apologize to all. I have not noticed errors in my own script. In the first line I wrote Twilight and in the third I wrote Twiligt ...