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

my output says that it expected <eof> but got 'end' can someone help and tell me whats going on?

Asked by 4 years ago
Edited 4 years ago

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ServerStorage = game:GetService("ServerStorage")

local MapsFolder = ServerStorage:WaitForChild("Maps")

local Status = ReplicatedStorage:WaitForChild("Status")

local GameLength = 50

local reward = 50 while true do

Status.Value = "Waiting For Enough Players"

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

end

print ("end of game")

for i, player in pairs(game.Players:GetPlayers()) do character = player.Character`

01if not character then
02else
03    if character:FindFirstChild("GameTag") then
04        character.GameTag:Destroy()
05    end
06 
07    if player.Backpack:FindFirstChild("Sword") then
08        player.Backpack.Sword:Destroy()
09 
10    end
11 
12    if character:FindFirstChild("Sword") then
13        character.Sword:Destroy()
14        end
15 
16end
17 
18player:LoadCharacter()

end

ClonedMap:Destroy()

Status.Value = "Game Ended :("

wait(2) end`

ServerScriptService.main script:164: Expected <eof>, got 'end'  -  Studio  -  main script:164

0
yeah uh, can you put it all into 1 code so its easier to know where it is Gameplayer365247v2 1055 — 4y
0
how do i do that, i tried for like 10 minutes but it wont work CactusRequiem 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Expected <eof>, Got 'end' implies that there's one too many end statements, and as the error text says, said statement is located at the 164th line of your script.

Due to the way you've structured your code here, I have no clue where that line may be; by default, syntax errors are underlined in red, so it's relatively easy to find one. Additionally, <eof> errors are normally thrown at the end of the script unless you've put the extra end statement elsewhere that's not at the bottom.

If looking at line 164 doesn't solve your problem, try formatting your pasted code here in a way that is readable so that people may help you more easily.

Ad

Answer this question