• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

boolean type parameter?

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
I made a gold changer:

Code:
function onUse(cid, item, frompos, item2, topos)
	if item.actionid == 3333 then
		if getPlayerItemCount(cid, ITEM_GOLD_COIN) > 100
			then doPlayerRemoveItem(cid, ITEM_GOLD_COIN, 100)
				 doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
		end
		end
		end

and it works fine in game but in my console i get

Code:
Lua Script Error:  [Action Interface]
blah.lua:onUse

LuaScriptInterface::popBoolean<>. Error: Expected boolean type parameter.

I'm new at coding so what does this mean?
 
Try this maybe.

LUA:
function onUse(cid, item, frompos, item2, topos)
	if item.actionid == 3333 then
		if getPlayerItemCount(cid, ITEM_GOLD_COIN) > 100 then
			doPlayerRemoveItem(cid, ITEM_GOLD_COIN, 100)
			doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
		end
	end
	return true
end
 
LUA:
function onUse(cid, item, frompos, item2, topos)
	if item.actionid == 3333 then
		if getPlayerItemCount(cid, 2148) > 100 then
	                doPlayerRemoveItem(cid, 2148, 100)
		        doPlayerAddItem(cid, 2152, 1)
                end
	end
return true
end
 
Last edited:
Back
Top