• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Npc Bank

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
Bug: Try transfer gold for some nick + some space at end of name, the npc will transfer for nobody

tfs 1.2

We are using this script for bank npc:
hastebin
 
Solution
Lel, that's because its only the if, you need to change the variable that the script will use:
below
Code:
local function creatureSayCallback(cid, type, msg)
add
Code:
msg = msg:match("^%s*(.-)%s*$")
and remove it from the if, it is no longer needed.
I write (example):

Player Name

0f-n9gIlSWSPqHStverSpg.png

with space, withtou quotation
 
I tryed with gsub too and got error, the string dont got error but dont changing nothing


Lua Script Error: [Npc interface]
data/npc/scripts/Rokyn.lua:onCreatureSay
data/npc/scripts/Rokyn.lua:495: bad argument #2 to 'gsub' (string expected, got no value)
stack traceback:
[C]: at 0x004de660
[C]: in function 'gsub'
data/npc/scripts/Rokyn.lua:495: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:431: in function 'onCreatureSay'
data/npc/scripts/Rokyn.lua:10: in function <data/npc/scripts/Rokyn.lua:10>
 
Lel, that's because its only the if, you need to change the variable that the script will use:
below
Code:
local function creatureSayCallback(cid, type, msg)
add
Code:
msg = msg:match("^%s*(.-)%s*$")
and remove it from the if, it is no longer needed.
 
Solution

Similar threads

Back
Top