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

ServerScriptService.MainScript:163: '<eof>' expected near 'end'?

Asked by 5 years ago
Edited 5 years ago

The help at the end of my game code is not wording can you help me

` if character:FindFirstChild("GameTag") then -- They are still alive print(player.Name.." is still in the game!") else -- They are dead table.remove(plrs,x) print(player.Name.." has been removed!") end end end table.remove(plrs,x) print(player.Name.." has been removed!") end end

    Status.Value = "There are "..i.." seconds remaining, and "..#plrs.." players left"

    if #plrs == 1 then
        -- Last person standing
        Status.Value = "The willnner is "..plrs[1].Name
        plrs[1].leaderstats.Bucks.Value = plrs[1].leaderstats.Bucks.Value + reward
        break
    elseif #plrs == 0 then
        Status.Value = "Nobody won!"
        break
    elseif i == 0 then
        Status.value = "Time up!"
        break 
    end

    wait(1)
end

print("End of the game")

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

    if not character then
        -- Ignore then
    else
        if character:FindFirstChild("GameTag") then
            character.GameTag:Destroy()
        end

        if player.Backpack:FindFirstChild("Sword") then
            player.Backpack.Sword:Destroy()
        end

        if character:FindFirstChild("Sword") then
            character.Sword:Destroy()
        end

    end

    player:LoadCharacter()
end

ClonedMap:Destroy()

Status.Value = "Game ended"

wait(2)

end `

0
the formatting is screwed User#24403 69 — 5y
0
I do not get this, the format is broken... TheOnlySmarts 233 — 5y
0
You have 3 ends at the beginning. I don't know if it is a full code or not but might want to take a look into that. Zafirua 1348 — 5y
0
If you want us to be able to help you, please tell us where you think the error is occuring, if there are any error messages, and what the script or section of script that is not working is supposed to do if it were working. User#25115 0 — 5y
View all comments (2 more)
0
We cannot help with no information. User#25115 0 — 5y
0
I realize that you put the error message in your title, but that says line 163. You must provide us with some information and context to go on. User#25115 0 — 5y

Answer this question