if with 2 conditions
i need an if with 2 conditions
You would use an "and" For example,
if a == 1 and b == 2 then print("true") end
Yeah, like @apinguen just said, there is and/or conditions
if i == 10 and game == true then
//Both Conditions must be met for code to run
end
or :)
if i == 10 or game == true then
//only one condition must be met for code to run
end
You can also nest it like:
if game == true then
//some code
if i == 10 then
//some code if both conditions are true
end
end