Quantcast
Channel: Lua - if statement with two conditions on the same variable? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Lua - if statement with two conditions on the same variable?

$
0
0

How can I set a lower and upper bound value for a variable in a if-statement in lua programming language? I need something like the pseudocode below.

if ("100000">= my_variable <= "80000") then     do stuff...end

I've tried different formats but my application keeps crashing.

Update:

To anyone with the same sort of doubts about lua's syntax, i'd recommend checking the documentation here and keeping it handy. It'll be useful while learning.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images