Jump to content

Valo nulo ? Attemp to call global "createMaker"


Recommended Posts

Meu script com mta esta dando problema com Valo nulo que não consigo resolver

Minicio = createMaker (-2084.712890625, 229.470703125, 35.72966003418, "cylinder", 2, 255, 0 ,0, 255)

veh[source] = {}

function inicio (source)

if isElementWithinMarker(source, Minicio) then 
if veh[source] and isElementWithinMarker ( veh[sorce] ) then destroyElement ( veh[source] )
veh[source] = nil
end
x,y,z = getElementPosition(source)
Trabalho = true
veh[source] = createVehicle(524, -2088.3271484375, 258.548828125, 35.823341369629)
outputChatBox ( "#00ff00,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",sorce, 0,0,0,true )
outputChatBox ( "LEVE O VEICULO ATE A PEDREIRA DE LAS VENTURAS",sorce, 0,0,0,true )
outputChatBox ( "#00ff00,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",sorce, 0,0,0,true )
end
end
addEventHandler( "onMarkerHit", Minicio, inicio )

Link to comment

Nome da função createMarker tá errado. Você não está criando a tabela 'veh' antes de indexá-la. E em algumas linhas do código, você escreveu 'sorce' em vez de source.

Lembre-se sempre de usar /debugscript 3 quando for testar um script para depurar o código.

  • Like 1
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...