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

Expected "End" to close?

Asked by 4 years ago
Edited 4 years ago

It's a shame I'm already back asking question but does anyone know how to fix this

Full Script

01---------------
02-- Constants--
03----------------
04 
05local DivisionsFrame = script.Parent.Parent.Divisions
06local UniformFrame = script.Parent.Parent.Uniforms
07local MorphDir = game.ReplicatedStorage.Morphs
08local Libs = game.ReplicatedStorage.Libs
09-----------------
10--Main Code---
11-----------------
12 
13for i, v in pairs (MorphDir:GetChildren () ) do
14    local Button = Instance.new("TextButton")
15    Button.Size = UDim2.new(1, 0, 0, 50)
View all 45 lines...

--It's the end above thats the problem, I think...

Edit- Heres the output

Players.JustTwiggy.PlayerGui.MorphSelection.Scripts.LocalScript:54: Expected 'end' (to close 'do' at line 18), got <eof>; did you forget to close 'do' at line 38?

0
Does it show a line in the script thats the error? PhantomBrix 40 — 4y
0
If you click on the error what line line does it take you to? PhantomBrix 40 — 4y
0
It just takes we to the bottom of the script, where the end is JustTwiggy 5 — 4y
0
Can you provide the full script? ImTrev 344 — 4y
View all comments (3 more)
0
I agree, something is wrong at line 38 (according to the error message) but we can't see it. PhantomBrix 40 — 4y
0
I assume you haven't closed a for loop that started at line 38, try putting an end at the end of said for loop. PhantomBrix 40 — 4y
0
I put a end there and there is still a problem JustTwiggy 5 — 4y

2 answers

Log in to vote
0
Answered by
ImTrev 344 Moderation Voter
4 years ago
Edited 4 years ago

With everything and fixed indentations this is what is there. If this is not working as intended please let me know and we can further debug.

01---------------
02-- Constants--
03----------------
04 
05local DivisionsFrame = script.Parent.Parent.Divisions
06local UniformFrame = script.Parent.Parent.Uniforms
07local MorphDir = game.ReplicatedStorage.Morphs
08local Libs = game.ReplicatedStorage.Libs
09-----------------
10--Main Code---
11-----------------
12 
13for i, v in pairs(MorphDir:GetChildren () ) do
14    local Button = Instance.new("TextButton")
15    Button.Size = UDim2.new(1, 0, 0, 50)
View all 47 lines...
0
How dare you answer before me Official_DuckyYT 55 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

The problem is that you forgot an end at the first for loop, so it should be:

01---------------
02-- Constants--
03----------------
04 
05local DivisionsFrame = script.Parent.Parent.Divisions
06local UniformFrame = script.Parent.Parent.Uniforms
07local MorphDir = game.ReplicatedStorage.Morphs
08local Libs = game.ReplicatedStorage.Libs
09-----------------
10--Main Code---
11-----------------
12 
13for i, v in pairs (MorphDir:GetChildren () ) do
14    local Button = Instance.new("TextButton")
15    Button.Size = UDim2.new(1, 0, 0, 50)
View all 46 lines...

Also fixed another error which you had, and put Button and then tried to define it as Button2

-Ducky

Developer

Youtuber

Answer this question