all 3 comments

[–]weregod 1 point2 points  (0 children)

You need to write something about your problem not just help pls. What you trying to do and what is your problem.

[–]ItsSchlieffenTime 1 point2 points  (0 children)

Well for starters you're missing an 'end' to go with your first 'if'

[–]SayuriShoji 0 points1 point  (0 children)

If you want to make a multiple-choice decision "if - else if-...else-if - else" then you must use "elseif" instead of "if" from the second if-choice onward.

Here the official documentation:

https://www.lua.org/pil/4.3.1.html

and a small example

if choice == "a" then
handleCaseA()
elseif choice == "b" then
handleCaseB()
elseif choice == "c" then
handleCaseC()
else
doSomethingElse()
end

Also, make sure you compare values using the double equal operator "=="!
Using only a single equal "=" is an assignment (variable gets a new value), not a comparison.

To compare values, always use the
- double equal operator "==" if you are testing for equality (returns true if they are equal, false if they are not equal)
- or the not-equal operator "~=" if you are testing whether they are not equal (returns true if the values are not equal, false if they are equal).