• 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 doPlayerAddItemEx -CRASH

Hindori

New Member
Joined
Jan 24, 2009
Messages
157
Reaction score
2
In my script i use something like this :
item = doCreateItemEx(params.ball)
doItemSetAttribute(item, "nome", params.nome)
doItemSetAttribute(item, "description", params.description)
doItemSetAttribute(item, "aid", pokes.aid)
doItemSetAttribute(item, "pmhp", params.pmhp)
doItemSetAttribute(item, "pthp", params.pthp)
doPlayerAddItemEx(params.cid, item, true)
doTransformItem(item, newid)


All is good if i have any item in foot slot but if i havent item create here and if u use it,look at this logout server crash.
 
Last edited:
does the item have a scripted onEquip event registered in movements.xml?

if yes, it's a doPlayerAddItem/Ex fault not doCreateItemEx
 
it's a very old bug, still haven't come up with a proper fix for it.

it's this part btw
[cpp]//
if(!g_moveEvents->onPlayerEquip(const_cast<Player*>(this), const_cast<Item*>(item), (slots_t)index, true))
return RET_CANNOTBEDRESSED;[/cpp]
 
If you haven't noticed he has bolded true in the code piece he has posted. You probably have to do something with that - change, comment, delete - not sure what, but at least he pointed you where should you look at.
no fgt, it's cpp syntax highlight
[cpp]false true[/cpp]
 
Back
Top