Jump to content

can't use ~=


Andreas.

Recommended Posts

Posted (edited)
  
local a = 5 
local b = 10 
  
if(a ~= b) then -- NOT EQUAL 
    -- code 
end 
  

  
showCursor(not isCursorShowing()) -- INVERSION 
  

Maybe you post your code?

Edited by Guest
Posted
Hoi, but ~= is the same as "not" right? If it is, why can't I use it? "unexpected symbol near ~"

It's not the same.

"not" means "condition == false/nil"

"~=" means "condition is not something".

Posted

"not" means "condition == false/nil"

NOT not only equal operator.

What? Explain that better because I think I didn't understand. "not" is an operator that means "condition is false/nil". It has nothing to do with equal operator -_-

Posted

What? Explain that better because I think I didn't understand. "not" is an operator that means "condition is false/nil". It has nothing to do with equal operator -_-

Ok.

"not" isn't only means "condition == false/nil".

Posted
Oh so what does it mean? That the condition is true? :lol:

Stop. In this topic you shown your Lua experience.

Operator NOT also invert value. You must know this.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...