Jump to content

[Help] table index nil


jawwel

Recommended Posts

function signUpToTDM(plr)
    if (tonumber(getPlayersInDimension(860)) >= 1) then
        outputChatBox("TDM are in progress, please, wait for them to finish and re-try", plr, 255, 255, 0)
        return
    end
    if (not signedPlayers[plr]) then
        table.insert(signingPlayers, plr)
        signedPlayers[plr] = true
        outputChatBox("You have joined TDM!  Try get as many team kills as possible!", plr, 255, 255, 0)
        outputChatBox("/leave to cancel TDM.", plr, 255, 255, 0)
            for k, v in ipairs(signingPlayers) do
            outputChatBox(""..#signingPlayers.."/"..playerLimit.." are now signed up", v, 255, 255, 0)
        end
        if (#signingPlayers == playerLimit) then
            setTimer(stopDx, 50, 1)
            warpPlayersToField()
            destroyMarker()
            timeOutTimer = setTimer(timeOutEvent, tonumber(timeToFinish), 1)
            timeOut = false
            for k, v in pairs(signingPlayers) do
                if (isElement(v)) then
                        triggerClientEvent(v, "TDM.Countdown", v)    
                end    
            end
        end
    end
end

whats wrong ?

table index nil

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...