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

'<eof>' expected near end???

Asked by
Daigox 0
6 years ago
Edited 6 years ago

I have an error that said "'<eof>' expected near end" and I don't know what it means.

001-- Define Variables
002 
003local ReplicatedStorage = game:GetService("ReplicatedStorage")
004 
005local ServerStorage = game:GetService("ServerStorage")
006 
007local MapsFolder = ServerStorage:WaitForChild("Maps")
008 
009local Status = ReplicatedStorage:WaitForChild("Status")
010 
011local GameLength = 50
012 
013local reward = 5
014 
015-- Game Loop
View all 164 lines...
0
like jesus what is this tacotown2 119 — 6y
0
fyi eof stands for end of file but please fix the tags GoldAngelInDisguise 297 — 6y
0
You Script have extra ends. ksony 54 — 6y
View all comments (4 more)
0
Code block expected on line 1. User#5423 17 — 6y
0
Can you please make your script look better..? Organize it. This hurts my eyes :/ HeyItzDanniee 252 — 6y
0
Remove end in line 164 yHasteeD 1819 — 6y
0
Indent the code properly and you will be able to fix it yourself. Zafirua 1348 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

You have extra ends here and there and also never really actually ended your while loop as well.

For future reference, to fix these sort of problems, begin by pasting it in a new file and start indenting on every new scope you have. You just need to be patience of this kinds of things.

Here is your fixed code. Of course since you know the script better than anybody else, you might have to change here and there. I indented it and fixed it through my general understanding of your code.

But do please double check.

001while true do
002    Status.Value = "Waiting for enough players"
003 
004    repeat wait() until game.Players.NumPlayers >= 2
005 
006    Status.Value = "Intermisson"
007    wait (10)
008 
009    local plrs = {}
010 
011    for i, player in pairs(game.Players:GetPlayers())do
012        if player then
013            table.insert(plrs,player) -- Add each player into plrs table
014        end
015    end
View all 117 lines...
Ad

Answer this question