• 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 What's Wrong?

xTremoxx

domasturb(cid, genital)
Joined
Aug 11, 2007
Messages
418
Reaction score
6
Location
Brazil
Hi, when i use this item i get this error..


/Expotion.lua:8 attempt to call global 'doSetItemActiondId' < a nil value>

Script:

PHP:
function onUse(cid, item, frompos, item2, topos)
	if not((getPlayerStorageValue(cid, 25651) > 0) and (getPlayerStorageValue(cid, 25652) > 0) and (getPlayerStorageValue(cid, 25653) > 0)) then
		local charges = ((item.actionid == 0) and 3) or (item.actionid - 100)
		if (charges == 1) then
			doRemoveItem(item.uid)
		else
			charges = charges - 1
			doSetItemActionId(item.uid, 100 + charges)
		end
		doCreatureSay(cid, "Exp UP!", TALKTYPE_ORANGE_1)
		if not(getPlayerStorageValue(cid, 25651) > 0) then
			setPlayerStorageValue(cid, 25651, 60 * 60)
		elseif not(getPlayerStorageValue(cid, 25652) > 0) then
			setPlayerStorageValue(cid, 25652, 60 * 60)
		elseif not(getPlayerStorageValue(cid, 25653) > 0) then
			setPlayerStorageValue(cid, 25653, 60 * 60)
		end
	else
		doPlayerSendCancel(cid, "Você não pode usar mais que 3 Pacotes de EXP simultaneamente.")
	end
	return true
end
 
This:
Lua:
doSetItemActionId(item.uid, 100 + charges)
To this:
Lua:
doItemSetAttribute(item.uid, 'aid', 100 + charges)
 
Back
Top