lol = {"a", "b"}
if unpack(lol) == "a b" then
print("yep")
end
It never prints "yep", what is the reason behind that?
lol = {"a", "b"}
if unpack(lol) == "a b" then
print("yep")
end
It never prints "yep", what is the reason behind that?
You can't compare tuples, much less like that. I highly suggest you go read up on how Tuples work.
t = {"a","b"}
if unpack(t) == "a" and "b" then
print('yep')
end
"a b" would be considered as one element. thats the problem
wrong
works fine for me. i don't know why you downvoted
I downvoted because it's wrong. Try it with t = {'a', 'b'} but don't change your condition
It will (incorrectly) print 'yep'
I wrote t={'a','b'} by accident but I meant t={'a', 'c'}
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
my dude. just unpack into a table then compare via an in-depth function