Ecstacy
Mothafuckaaa
Hey,
Could somebody tell me whats wrong about this script, as I can't see the problem.
I keep getting this error:
Here's the script:
Thank in advance,
unknown666
Could somebody tell me whats wrong about this script, as I can't see the problem.
I keep getting this error:
Code:
[18/09/2010 13:25:38] [Error - TalkAction Interface]
[18/09/2010 13:25:38] data/talkactions/scripts/vocationchoose\vocations.lua:onSay
[18/09/2010 13:25:38] Description:
[18/09/2010 13:25:38] ...ata/talkactions/scripts/vocationchoose\vocations.lua:14: attempt to index local 'r' (a nil value)
[18/09/2010 13:25:38] stack traceback:
[18/09/2010 13:25:38] ...ata/talkactions/scripts/vocationchoose\vocations.lua:14: in function <...ata/talkactions/scripts/vocationchoose\vocations.lua:9>
Here's the script:
LUA:
local vocations = {
['farmer'] = {
tpos={x=1029,y=994,z=7}, -- tile pos
msg = ''
}
}
local vocname = {'farmer'}
function onSay(cid,words,param)
local v = getThingPos(cid)
if words == '!information' and isInArray(vocname,param) then
local r = vocations.param
if isInRange(cid,r.tpos,r.tpos) then
doSendMagicEffect(v,10)
else
doSendMagicEffect(v,2)
end
else
doPlayerSendTextMessage(cid,27,'Not Possible.')
end
return true
end
Thank in advance,
unknown666