Jump to content

WARNING


yToPzz

Recommended Posts

WARNING: [SCRIPTS]\Trab3\s.lua:63: Bad argument @ 'destroyElement' [Expected element at argument 1]

the error occurs when the truck's load explodes and when the player leaves when the truck is destroyed, it gives the error, so would there be a way to prevent this?

 

function sair4 (source)
if veh[source] and isElement(veh[source]) then
Trabalho = false
destroyElement (veh[source])
destroyElement (carga[source]) --- line 63
carga[source] = nil
setElementVisibleTo ( blipfim4, source, false )
setElementVisibleTo ( entregartrab4, source, false )
setPedSkin (source,0)
outputChatBox ('#000000[#ffffff Trabalho 3#000000 ]#FF0000 Você saiu do veiculo e perdeu o trabalho !',source,255,255,255,true)
setElementData(source, "Trab", false)
   end
end
addEventHandler ("onVehicleExit", root, sair4)


 

Edited by yToPzz
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...