Jump to content

Race Debugscript 3 Error


SnoopCat

Recommended Posts

Posted

hello i was checking my server debugscript 3 and this is what i get.

dibujovl3iv.png

here is the line its says where is the problem:

function updateSpecs() 
    local snr = 0 
    for k, v in ipairs(getElementsByType("player")) do 
        if (getElementData(v, 'Player.Name')) then 
            if getElementData(v, 'spectates') == getLocalPlayer() then 
                snr = snr + 1 
            end 
        end 
    end 
    stext = tostring("Spectators: "..snr) 
    g_dxGUI['spectators']:text(stext) 
end 
  
  

im a little noob on scripting so idk what must be the problem... can someone helps me?

Posted

You must use dxText:create first, you are doing:

g_dxGUI['spectators']:text(stext) 

Without creating the text.

g_dxGUI = dxText:create ( ... ) 

Posted

I can't fix it, since I don't know the purpose of spectators.

The part where there is local g_dxGUI = {

You got a lot of dxText:create

Add one for spectators.

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...