Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why does the "=" have a syntax error? Trying to prove that turkey is superior to MONKE

Asked by 4 years ago
local turkey = 420
local monkey = 69
function question()
    print("Does turkey = monkey")
end
if turkey = monkey then
    print(yes)
else
    print(no)
end

1 answer

Log in to vote
1
Answered by 4 years ago

use == instead of = because = is just to set stuff like

local monkey = 123
local turkey = 31

monkey = turkey will set monkey to 31 == in the other hand is an math operation(not quite) and is used to compare, there are others like ~= for checking if 2 values is different

0
I recommend you look at the operators you can use to add on OrbitalCent 0 — 4y
Ad

Answer this question