Log In  

I was doing some table comparing logic like so:

local a,b = {},{}
local t = a

if not t==b then
 ?"!",7
end

And using the not operator can trip you up cause it's not testing against the whole bool==bool (I think..?)
but instead (not bool)==bool!
Anyways I was stuck on this problem for hours and I wanted to let other's be aware if they're not.
Thanks to @pancelor for figuring it out and helping me.
(it turns out I just wanted to do

if t~=b then
 -- ...
end

)

P#111830 2022-05-14 22:04


[Please log in to post a comment]