• 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 ERROR: OnBuy | TFS 0.4 | HELP!!!

drhoficial

New Member
Joined
Aug 8, 2024
Messages
1
Reaction score
0
I've tried looking for solutions here on the forum and so far I haven't found anything that can help me.
ERROR:
[0:30:19] [Error - NpcScript Interface]
[0:30:19] (Unknown script file)
[0:30:19] Description:
[0:30:19] data/npc/lib/npcsystem/npchandler.lua:263: bad argument #1 to 'unpack' (table expected, got nil)
[0:30:19] stack traceback:
[0:30:19] [C]: in function 'unpack'
[0:30:19] data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[0:30:19] data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[0:30:19] data/npc/lib/npcsystem/modules.lua:1302: in function <data/npc/lib/npcsystem/modules.lua:1301>
NPC:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Carlinhos" script="default.lua" floorchange="0">
<health now="150" max="150"/>
<look type="134" head="114" body="113" legs="113" feet="113" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="message_greet" value="Hallow |PLAYERNAME|.I sell yellow potions, mana potions and polly potions, mas lembre-se eh mais barato vc fabrica-las do que compra-las, say {trade}" />
<parameter key="shop_buyable" value="yp,2269,120; mp,2272,180; pp,2270,220" />
</parameters>
</npc>
 
Back
Top