Jump to content

please fix code


Recommended Posts

Posted

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 

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

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

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