Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 Help me,please. local PDmarkers={ [1]={1553,-1678,14.5,"cylinder",0.5,0,0,0,0}, } local markers= { } for i,markers in ipairs(PDmarkers) do markers[i] = createMarker(marker[1],marker[2],marker[3],marker[4],marker[5],marker[6],marker[7],marker[8],marker[9]) end attemp to index global 'marker' a nil value. Link to comment
xXMADEXx Posted January 12, 2014 Share Posted January 12, 2014 Try this: local PDmarkers={ [1]={1553,-1678,14.5,"cylinder",0.5,0,0,0,0}, } local marker = { } for i,markers in pairs(PDmarkers) do marker[i] = createMarker(unpack(markers)) end Link to comment
Bzz335 Posted January 12, 2014 Author Share Posted January 12, 2014 Try this: local PDmarkers={ [1]={1553,-1678,14.5,"cylinder",0.5,0,0,0,0}, } local marker = { } for i,markers in pairs(PDmarkers) do marker[i] = createMarker(unpack(markers)) end Don't work. Attemp to index global "marker" nill value. Link to comment
xXMADEXx Posted January 12, 2014 Share Posted January 12, 2014 Here is the exact code I used & tested local PDmarkers={ { 1553,-1678,14.5, "cylinder", 1, 0, 0, 0, 0 }, } local marker = { } for i,markers in pairs ( PDmarkers ) do local x, y, z, t, s, r, g, b, a = unpack ( markers ) marker[i] = createMarker ( x, y, z, t, s, r, g, b, a ) end 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