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

[8.2] Next bug with script :PP

tarjei

Necronian Engineer
Joined
May 25, 2008
Messages
505
Reaction score
126
Location
Poland
PHP:
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:buyContainer({'bp mp'}, 2000, 7620, 1000, 20, 'Backpack of Mana Potions')
shopModule:buyContainer({'bp hp'}, 2000, 7618, 1000, 20, 'Backpack of Health Potions')
shopModule:buyContainer({'bp smp'}, 2000, 7589, 2200, 20, 'Backpack of Strong Mana Potions')
shopModule:buyContainer({'bp shp'}, 2000, 7588, 2200, 20, 'Backpack of Strong Health Potions')
shopModule:buyContainer({'bp gmp'}, 2000, 7590, 4400, 20, 'Backpack of Great Mana Potions')
shopModule:buyContainer({'bp ghp'}, 2000, 7591, 4400, 20, 'Backpack of Great Health Potions')
npcHandler:addModule(FocusModule:new())
When i want to make Npc i have bug i console
PHP:
[31/08/2008  22:45:15] data/npc/scripts/bprune.lua:9: attempt to index global 'npcHandler' (a nil value)
[31/08/2008  22:45:15] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/bprune.lua
[31/08/2008  22:45:15] data/npc/scripts/IsimovK.lua:45: 'end' expected (to close 'function' at line 12) near 'elseif'
[31/08/2008  22:45:44] [Notice - Npc::Npc] NPC Name: Ulvhedin - autowalk has been deprecated, use walkinterval.
[31/08/2008  22:45:44] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/bprune.lua
[31/08/2008  22:45:44] data/npc/scripts/bprune.lua:18: '<eof>' expected near 'end'

What is wrong i this script ? :p
Thx for any help :)
 
This can't be the correct script.. The error says that there is an elseif on line 12. Line 12 is
Code:
shopModule:buyContainer({'bp hp'}, 2000, 7618, 1000, 20, 'Backpack of Health Potions')
 
Back
Top