Hi im using the npc banker made by gesior in a post about house auction but i'd like to set it to not transfer if the target player have no vocation..
I asked in a brazillian forum for a help and a guy did with a change it gives me an error.. so.. is there anyone able to make it work to me?
Im using TFS 1.2
I asked in a brazillian forum for a help and a guy did with a change it gives me an error.. so.. is there anyone able to make it work to me?
Im using TFS 1.2
Code:
Lua Script Error: [Npc interface]
data/npc/scripts/banker.lua:onCreatureSay
data/npc/scripts/banker.lua:191: attempt to index local 'target' (a nil value)
stack traceback:
[C]: in function '__index'
data/npc/scripts/banker.lua:191: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:407: in function 'onCreatureSay'
data/npc/scripts/banker.lua:9: in function <data/npc/scripts/banker.lua:9>
Code:
if getPlayerBalance(cid) - getPlayerBiddedMoney(cid) >= count[cid] then
if v or findPlayer(msg):lower() == msg:lower() then
local target = getPlayerName(v)
if target:getVocation() ~= 0 then
transfer[cid] = msg
npcHandler:say('Would you really like to transfer ' .. count[cid] .. ' gold to ' .. getPlayerName(v) .. '?', cid)
Topic[cid] = 7
else
npcHandler:say('You cannot transfer money to rook citizen.', cid)
Topic[cid] = 5
end
else
npcHandler:say('This player does not exist.', cid)
Topic[cid] = nil
end
else
npcHandler:say('There is not enough gold on your account.', cid)
Topic[cid] = nil
end