Sentinel3
New Member
- Joined
- Oct 16, 2014
- Messages
- 180
- Reaction score
- 0
Hey!
Well, it's very simple I have TFS 1.0, but I can't find the function 'doPlayerWithdrawMoney' for Banker NPC like Naji.
Can someone pass me the function or tell me where can I find it?
By the way I have tryed one and it gives this error.
Thank you so much in advice!!
Error:
The function I have:
Well, it's very simple I have TFS 1.0, but I can't find the function 'doPlayerWithdrawMoney' for Banker NPC like Naji.
Can someone pass me the function or tell me where can I find it?
By the way I have tryed one and it gives this error.
Thank you so much in advice!!
Error:
HTML:
Lua Script Error: [Npc interface]
data/npc/scripts/bank.lua:onCreatureSay
data/global.lua:830: attempt to call global 'getBooleanFromString' (a nil value)
stack traceback:
[C]: in function 'getBooleanFromString'
data/global.lua:830: in function 'doPlayerWithdrawMoney'
data/npc/scripts/bank.lua:170: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:403: in function 'onCreatureSay'
data/npc/scripts/bank.lua:14: in function <data/npc/scripts/bank.lua:14>
The function I have:
HTML:
function doPlayerWithdrawMoney(cid, amount)
if(not getBooleanFromString(getConfigInfo('bankSystem'))) then
return false
end
local balance = getPlayerBalance(cid)
if(amount > balance or not doPlayerAddMoney(cid, amount)) then
return false
end
doPlayerSetBalance(cid, balance - amount)
return true
end
Last edited: