• 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!

Some problem in this script

Ecstacy

Mothafuckaaa
Joined
Dec 26, 2008
Messages
3,836
Reaction score
108
Location
The Netherlands
Hey,

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
 
Code:
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
 
Back
Top