This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

My lua script is not return the result that I want
#1
I want to set v = false if condition true or otherwise v = nil. I use this code:

Code:
value = 4>3 and false or nil

or

Code:
value = 3<4 and false or nil

The result always nil. Do you know why it's not work? How could I fix it. I want to write in shortway so I dont want to use if conditon.

Well I ask google gemini and get the answer. thanks.
Reply


Messages In This Thread
My lua script is not return the result that I want - by pouralise - 26.03.2025, 11:24

Forum Jump: