script :
local job = string.split(str,",")
if job[1] == "Visitor" or "Raider" then
print(job[1])
end
for some reason even when job[1] string isn't visitor or raider it still passes and prints job[1] and I don't know why, any ideas?
script :
local job = string.split(str,",")
if job[1] == "Visitor" or "Raider" then
print(job[1])
end
for some reason even when job[1] string isn't visitor or raider it still passes and prints job[1] and I don't know why, any ideas?
You can't just use or you need to check the value again.
local job = string.split(str,",")
if job[1] == "Visitor" or job[1] == "Raider" then
print(job[1])
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
you need to do "if job[1] == "Visitor" or job[1] == "Raider then", the "or" is to do another check the first check is false or nil.