Emilio_M Posted February 1, 2015 Share Posted February 1, 2015 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
TAPL Posted February 1, 2015 Share Posted February 1, 2015 if not table145[thePlayer][i] then Link to comment
Emilio_M Posted February 1, 2015 Author Share Posted February 1, 2015 Thx but if i want [1] table145[player][slot][1] = object table145[player][slot][1] = nil How i proceed ? Thanks. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now