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

Im confused? with this script says error Expected 'end' (to close 'then' at line 35), got <eof>

Asked by 5 years ago
Edited by royaltoe 5 years ago

I am a beginner and dont know how to script im starting and i was following a youtube channel help please

001-- Define variables    --Made by munder12e--
002 
003local ReplicatedStorage = game:GetService("ReplicatedStorage")
004local ServerStorage = game:GetService("ServerStorage")
005local MapsFolder = ServerStorage:WaitForChild("Maps")
006local Status = ReplicatedStorage:WaitForChild("Status")
007local GameLength = 50
008 
009while true do
010    Status.Value = "Waiting for enough players"
011    repeat wait() until game.Players.NumPlayers >= 2
012    Status.Value = "Intermission"
013 
014    wait(10)
015 
View all 121 lines...

1 answer

Log in to vote
0
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
5 years ago
Edited 5 years ago

EOF stands for End of File. Each scope that gets created is required to be closed, in other languages it can be determined by different syntax, however Lua defines a closed scope via the end keyword.

At line 43 you didn’t close the scope respectfully, also left an open end in an improper scope too, at 71.

Fixed program.

001- Define variables    --Made by munder12e--
002 
003local ReplicatedStorage = game:GetService("ReplicatedStorage")
004local ServerStorage = game:GetService("ServerStorage")
005local MapsFolder = ServerStorage:WaitForChild("Maps")
006local Status = ReplicatedStorage:WaitForChild("Status")
007local GameLength = 50
008 
009while true do
010    Status.Value = "Waiting for enough players"
011    repeat wait() until game.Players.NumPlayers >= 2
012    Status.Value = "Intermission"
013 
014    wait(10)
015 
View all 121 lines...

Please do not follow YouTube tutorials unless they’re explaining or demonstrating a subject. Most programs are highly inefficient or buggy. Please try to do 80% of the work on your own.

Ad

Answer this question