Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
I need this script fixed.
This is the error I get.
PHP:
function onUse(cid, item, frompos, item2, topos)
local prize = {392, 421, 426, 437, 438}
if getPlayerStorageValue(cid, 9998) == -1 then
local randomChance = math.random(1, 5)
doPlayerAddMount(cid, prize[randomChance], 1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
return TRUE
end
This is the error I get.
PHP:
[22/11/2011 15:13:51] Lua Script Error: [Action Interface]
[22/11/2011 15:13:51] data/actions/scripts/addons/roll horse.lua:onUse
[22/11/2011 15:13:51] luaDoPlayerAddMount(). Player not found
[22/11/2011 15:13:51] stack traceback:
[22/11/2011 15:13:51] [C]: in function 'doPlayerAddMount'
[22/11/2011 15:13:51] data/actions/scripts/addons/roll horse.lua:6: in function <data/actions/scripts/addons/roll horse.lua:1>
Last edited: