Ahmed Abo-elezz Posted November 24, 2014 Posted November 24, 2014 why i got error table indes is nil in this line markertkhashab [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 255, theplayer ) please help me local Marjerkhashwood = { [1]={ -1635.6999511719, -2219.5, 30 }, [2]={ -1636.8000488281, -2203.6000976563, 30.400001525879 }, [3]={ -1731.3000488281, -2212, 55 }, [4]={ -1715.8000488281, -2235.6999511719, 46 }, [5]={ -1643.0999755859, -2261.8000488281, 31.599998474121 } } markertkhashab = { } blipkhshab = { } function startJobkhashab ( thePlayer, seat, jacked ) local x, y, z = unpack ( Marjerkhashwood [ math.random ( #Marjerkhashwood ) ] ) markertkhashab [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 255, theplayer ) blipkhshab [ thePlayer ] = createBlipAttachedTo ( markertkhashab [ thePlayer ], 58, 2, 255, 0, 0, 255, 0, 99999.0, thePlayer ) addEventHandler ( "onMarkerHit", markertkhashab [ thePlayer ], warpkhashab ) end My skype: ahmed.abouellezz My FB page: http://www.facebook.com/Capt.ahmed1
ALw7sH Posted November 24, 2014 Posted November 24, 2014 local Marjerkhashwood = { { -1635.6999511719, -2219.5, 30 }, { -1636.8000488281, -2203.6000976563, 30.400001525879 }, { -1731.3000488281, -2212, 55 }, { -1715.8000488281, -2235.6999511719, 46 }, { -1643.0999755859, -2261.8000488281, 31.599998474121 } }
Moderators IIYAMA Posted November 27, 2014 Moderators Posted November 27, 2014 @ALw7sH You just wrote exactly the same.... @Arab Real Life The variable thePlayer is nil. and why it is nil, is caused by your other code. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Saml1er Posted November 27, 2014 Posted November 27, 2014 Show us the part where you're calling startJobkhashab function.
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