Jump to content

Pedindo ajuda de novo!


Recommended Posts

[2019-01-16 15:15:05] WARNING: [Resources]\[Scr]Santander\FeniXMTA_s.lua:29: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
[2019-01-16 15:15:05] WARNING: [Resources]\[Scr]Santander\FeniXMTA_s.lua:36: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]

estou com estes 2 erros e como ainda sou muito novato em programação, venho humildemente pedir a ajuda de vocês, caros Deuses da programação

linhas onde dá o erro =

function teleport (hitElement)
		setElementPosition(hitElement,1500.975, -1133.117, 35.855)    ------ local onde vai o jogador
end
addEventHandler("onMarkerHit",marker,teleport)
--==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-
element["desçer"] = createMarker(1502.61, -1130.202, 35.855 -1,"cylinder",1.1,16, 102, 231, 50,getRootElement())   ----- local do marker

function teleport (hitElement)
		setElementPosition(hitElement,1509.906, -1132.619, 24.102)    ------ local onde vai o jogador
end
addEventHandler("onMarkerHit",marker,teleport)
--==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-

 

Link to comment

Cade o elemento "marker" ? Crie e então depois anexe o evento.

Ex:

element["desçer"] = createMarker(1502.61, -1130.202, 35.855 -1,"cylinder",1.1,16, 102, 231, 50,getRootElement())   ----- local do marker

function teleport (hitElement)
		setElementPosition(hitElement,1509.906, -1132.619, 24.102)    ------ local onde vai o jogador
end
addEventHandler("onMarkerHit",element["desçer"],teleport)

 

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