number boolean operators in if statement?

I could not find any example in the documentation I have available that shows more than 1, but I did not see it specified either.

Oftentimes, I find me needing 2, there is no error message, but it seems that this does not work. Does anyone know if more than 1 is possible? [import]uid: 109677 topic_id: 25008 reply_id: 325008[/import]

Not sure if I understand you correctly.

Here is an example of using multiple conditions in an if statement:

[lua]local shopsIsOpen = true
local beerPrice = 2
local cash = 5

if( shopsIsOpen and ( beerPrice <= cash ) ) then
print(“buy a beer!”)
else
print(“can’t buy a beer today”)
end[/lua]

or if you want to do an or:

[lua]local shopsIsOpen = true
local beerPrice = 2
local cash = 5
local haveFreeBeerToken = true

if( shopsIsOpen and ( ( beerPrice <= cash ) or haveFreeBeerToken) ) then
print(“buy a beer!”)
else
print(“can’t buy a beer today”)
end[/lua] [import]uid: 118390 topic_id: 25008 reply_id: 101589[/import]

I see, I will have to use (), it is evaluated what is inside, then what is outside etc., good. Thank you! [import]uid: 109677 topic_id: 25008 reply_id: 101598[/import]