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

Elseif syntax error? Whats wrong with it? Order?

Asked by
WishXVI 94
4 years ago

So I'm trying to make a code system, and apparently I suck, because the third code isn't working for me because its an error. This is my WHOLE code if I got some sort of order wrong, you may use this code if you can fix it. Thanks!

01local player = game.Players.LocalPlayer
02local RE = game.ReplicatedStorage.EnterCode
03local codes = player:WaitForChild("Codes")
04 
05--Optional if you want your code to have an expiration
06local date = os.date("*t", os.time())
07 
08--Codes
09local codelist = {
10    code1 = "iread", -- Always put a comma every timne you're going to add another code
11    code2 = "update2",
12    code3 = "adbonus"
13}
14 
15script.Parent.MouseButton1Click:Connect(function()
View all 70 lines...
0
You can't have elseif after 'end', it makes no sense, you can only have it after if or other elseif statement imKirda 4491 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

An elseif has to be on a line before the end of an if statement.

Ad

Answer this question