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

Solved Errors with 'Potions with chages' by Mock

JNLP

Hail Odin!
Joined
Aug 4, 2008
Messages
54
Reaction score
0
Location
Brazil
Hello again, guys! This time I'm having problem with the "Action Potions with charges (maden by Mock)". I added everything what Mock said, but it don't work. The errors are:

[18/03/2011 00:07:25] [Error - TalkAction Interface]
[18/03/2011 00:07:25] data/talkactions/scripts/pot.lua: onSay
[18/03/2011 00:07:25] Description:
[18/03/2011 00:07:25] (luaDoPlayerAddItem) Item not found

[18/03/2011 00:07:25] [Error - TalkAction Interface]
[18/03/2011 00:07:25] data/talkactions/scripts/pot.lua: onSay
[18/03/2011 00:07:25] Description:
[18/03/2011 00:07:25] data/lib/050-function.lua:222: attempt to index a boolean value
[18/03/2011 00:07:25] stack traceback:
[18/03/2011 00:07:25] data/lib/050-function.lua:222: in function 'getItemNameById'
[18/03/2011 00:07:25] data/lib/050-function.lua:716: in function 'doAddPotWithCharges'

Can anyone help me? Very Thanks!
 
Last edited:
I used exactly as Mock said in example: "11:38 GOD Ronnie Dio: /chargepotion 7620 100"

And I get the errors:

Code:
data/lib/050-function.lua:716: attempt to call global 'setItemName' (a nil value)
stack traceback:
data/lib/050-function.lua:716: in function 'doAddPotWithCharges'
data/talkactions/scripts/pot.lua:3: in function <data/talkactions/scripts/pot.lua:1>

050-function:
LUA:
function doAddPotWithCharges(cid,id,charge)
   local pot = doPlayerAddItem(cid, id)
   setItemName(pot, getItemNameById(id)..' x'..charge)
   return pot
end
 
You're missing the deprecated functions, add this to 050-function.lua:
LUA:
function setItemName(uid, name)
	doItemSetAttribute(uid, 'name', name)
end
 
Last edited:
Thanks, once again, Cykotitan! I'll test, and I edit here.

Worked! Rep+ (Lol, I still can't rep you ¬¬)
 
Last edited:
Back
Top