Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
So I got this script that summons a creature, but I don't want it to work when in PZ.
I get this error if used in PZ.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getPlayerPosition(cid)
local summom = getCreatureSummons(cid)
if(fromPosition.x ~= CONTAINER_POSITION) and item.itemid == 6579 then
spawnEffect = math.random(6, 7)
doRemoveItem(item.uid, 1)
doSummonCreature("Boy", toPosition)
doCreatureSay(cid, "Run little one!", TALKTYPE_ORANGE_1)
elseif(fromPosition.x ~= CONTAINER_POSITION) == false and item.itemid == 6579 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Place him on the ground first!")
end
return true
end
I get this error if used in PZ.
PHP:
[04/05/2012 03:20:50] Lua Script Error: [Action Interface]
[04/05/2012 03:20:50] data/actions/scripts/new/boy.lua:onUse
[04/05/2012 03:20:50] luaDoSummonCreature(). Can not summon monster: Boy
[04/05/2012 03:20:50] stack traceback:
[04/05/2012 03:20:50] [C]: in function 'doSummonCreature'
[04/05/2012 03:20:50] data/actions/scripts/new/boy.lua:7: in function <data/actions/scripts/new/boy.lua:1>