Blood BlvD Ot
Member
- Joined
- Jun 12, 2010
- Messages
- 243
- Reaction score
- 7
Ok so this is what i have!
small details tho.
This is it :
thats the part of the script that I need To Fix
The script loads up fine, its just when i actualy use this action with the fuction :
I get the error in my server log :
Any Idea?
small details tho.
This is it :
Code:
pos = getPlayerPosition
Level = getPlayerLevel(cid)
Vocation = getPlayerVocation(cid)
if isInArray(deadlist, item2.itemid) == true and
Level >= 100 -- set the level requirement to be able to do Alchemy
then
rand = math.random(1,6000)
if rand <= 1000 and Level >= 50 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 2000 and Level >= 1000 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 3000 and Level >= 7500 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 4000 and Level >= 10000 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 5000 and Level >= 25000 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 6000 and Level >= 35000 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 6000 and Level >= 45000 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
elseif rand <= 6000 and Level >= 65000 then
doConvinceCreature(cid, doCreateMonster("Flesh Eater", pos))
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
end
doSendMagicEffect(topos,3)
doPlayerSay(cid,"Follow me my family! Its time to destroy!",1)
else
doPlayerSendCancel(cid,"This is not a useable corpse! report to Dan if it is.")
end
return 1
end)
thats the part of the script that I need To Fix
The script loads up fine, its just when i actualy use this action with the fuction :
Code:
function onUse(cid, item, frompos, item2, topos)
I get the error in my server log :
Code:
[28/07/2010 23:42:49] [Error - Action Interface]
[28/07/2010 23:42:49] data/actions/scripts/bloodmage/lichstaff.lua:onUse
[28/07/2010 23:42:49] Description:
[28/07/2010 23:42:49] attempt to index a function value
[28/07/2010 23:42:49] stack traceback:
[28/07/2010 23:42:50] [C]: in function 'doCreateMonster'
[28/07/2010 23:42:50] data/actions/scripts/bloodmage/lichstaff.lua:46: in function <data/actions/scripts/bloodmage/lichstaff.lua:11>
Any Idea?