• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Erro function

demondark

New Member
Joined
Dec 20, 2007
Messages
140
Reaction score
0
data/talkactions/scripts/trainer.lua:11: attempt to call global 'getThingfromPos
' (a nil value)
stack traceback:
data/talkactions/scripts/trainer.lua:11: in function <data/talkactions/s
cripts/trainer.lua:1>


CODIGO

Code:
function onSay(cid, words, param)
-------------------------------Posição do player------------------------------------------------------
player = getPlayerPosition(cid)
------------------------------------------------------------------------------------------------------
-------------------------------Verifica storage value-------------------------------------------------
controle = getPlayerStorageValue(cid,trainer)
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
OesteExit = {x=500, y=500, z=7}
OestePos = {x=player.x-2, y=player.y, z=player.z, stackpos = 253}
OesteFrom = getThingfromPos(OestePos)


Have errors?
 
Don't use a variable when you're working with getPlayerPosition(cid).

Do it:

OestePos = {x=getPlayerPosition(cid).x-2, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z, stackpos=253}
OesteFrom = getThingfromPos(OestePos)

Ahh... remove the "---"... The script itself will not teach no one.
 
Back
Top