• 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!

What is wrong with the script

Yony

New Member
Joined
Sep 7, 2007
Messages
318
Reaction score
0
Location
Israel
Code:
local itemID = 6119 -- The ID of the item that will give you EXP
function onUse(cid, item, frompos, item2, topos)
if item.itemid == itemID then
 doSummonCreature(training monk , pos) 
 doRemoveItem(cid, item.uid, 1)
 else
 doPlayerSendCancel(cid, "Sorry, you can't summon this monster.")
 end
 return 1
 end
what is wrong?
 
Hmm, thx.. I get this error:
[01/04/2009 14:42:06] Lua Script Error: [Action Interface]
[01/04/2009 14:42:06] data/actions/scripts/other/summontrain.lua:eek:nUse

[01/04/2009 14:42:06] luaDoSummonMonster(). Creature not found
 
You need double quotes wrapped around the creature name ("Training Monk") not (Training Monk).
 
the function i need to use is doCreateMonster but I get this error also:
luaDoCreateMonster(). Can not create monster: training monk
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if doPlayerRemoveItem(cid, item.itemid, 1) == TRUE then
        doSummonCreature("Training Monk", getCreaturePosition(cid))
    end
    return TRUE
end
 
Back
Top