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

Lua npc erro

brTT

New Member
Joined
Jun 20, 2014
Messages
33
Reaction score
0
Code:
[18/07/2014 12:10:09] [Error - Npc interface]
[18/07/2014 12:10:09] data/npc/scripts/heal.lua:onCreatureSay
[18/07/2014 12:10:09] Description:
[18/07/2014 12:10:09] data/npc/scripts/heal.lua:58: bad argument #1 to 'sub' (number expected, got no value)
[18/07/2014 12:10:09] stack traceback:
[18/07/2014 12:10:09]     [C]: in function 'sub'
[18/07/2014 12:10:09]     data/npc/scripts/heal.lua:58: in function <data/npc/scripts/heal.lua:42>

npc
http://www.mediafire.com/view/rs62w898y4j5edj/heal.lua
 
As i said 'sub' is not defined.
Maybe tell me where did u get that script, u can try to define that 'sub', i am not sure what it is to

line
doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/")))
 
Back
Top