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
01local turkey = 420
02local monkey = 69
03function question()
04    print("Does turkey = monkey")
05end
06if turkey = monkey then
07    print(yes)
08else
09    print(no)
10end

1 answer

Log in to vote
1
Answered by 4 years ago

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

1local monkey = 123
2local 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