Jump to content

Table error ( wtf ?! )


Emilio_M

Recommended Posts

Hi all,

Today i have a very strangous error....

Like

attempt to index '?' a nil value

at

if not table145[thePlayer][i][1] then 

-> thePlayer is the player element ( it's verified )

-> i it's in a

for i=1,12 do 

at the top I add

local table145 = {} 

and

function fixConnect ( res ) 
    for k,v in ipairs(getElementsByType("player")) do 
        table145[v] = {} 
    end 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(), fixConnect ) 

I don't understand why... Thanks..

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