Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
I'm trying to make a script that gives you a random creature outfit by pulling a lever for 50 crystal coins.
I'm getting this error.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local c = {4, 5, 6, 7, 8, 9, 10}
if doPlayerRemoveMoney(cid, 500000) == TRUE then
local pPos = getPlayerPosition(cid)
doSendMagicEffect(pPos, 26)
doCreatureChangeOutfit(cid, c[math.random(#c)])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got a random outfit for 50 Crystal coins!")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50 Crystal coins.")
end
return TRUE
end
I'm getting this error.
PHP:
[22/02/2012 04:12:28] [C]: ?
[22/02/2012 04:12:28] [C]: in function 'doCreatureChangeOutfit'
[22/02/2012 04:12:28] data/actions/scripts/addons/random outfit.lua:6: in function <data/actions/scripts/addons/random outfit.lua:1>