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

getting error .. help me please .!

fewdox

New Member
Joined
Jan 9, 2010
Messages
244
Reaction score
2
Location
192.168.1.2 else try 127.0.0.1
ERROR:

[02/08/2010 14:04:04] [Error - CreatureScript Interface]
[02/08/2010 14:04:04] data/creaturescripts/scripts/monsterhunter.lua:eek:nKill
[02/08/2010 14:04:04] Description:
[02/08/2010 14:04:04] data/creaturescripts/scripts/monsterhunter.lua:23: attempt to call global 'doSetItemSpecialDescription' (a nil value)
[02/08/2010 14:04:04] stack traceback:
[02/08/2010 14:04:04] data/creaturescripts/scripts/monsterhunter.lua:23: in function <data/creaturescripts/scripts/monsterhunter.lua:2>


monsterhunter:

-- Copyright to teckman
function onKill(cid, target)

local config = {
monstername = "rotworm", -- monster name
needeedkills = 10, -- kills needed to complete quest
reward1 = 2160, -- first reward id
reward1count = 50, -- first reward count
wrightablereward = 5785, -- second reward id
effect = 15, -- effect used after completing quest
storage = 10001, -- storage of kills
hunterstorage = 10002, -- storage of completed quest
pos = getPlayerPosition(cid) -- replacement for cid is target
}
if(isMonster(target) == TRUE) then
if getCreatureName(target) == config.monstername then
if getPlayerStorageValue(cid, config.storage) == config.needeedkills-1 and getPlayerStorageValue(cid,config.hunterstorage) == -1 then
doCreatureSay(cid, "You killed "..config.needeedkills.." "..config.monstername..", you're a real "..config.monstername.." hunter. Here is your reward.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,config.hunterstorage,1)
doSendMagicEffect(config.pos, config.effect)
doPlayerAddItem(cid,config.reward1,config.reward1count)
medal = doPlayerAddItem(cid,config.wrightablereward,1)
doSetItemSpecialDescription(medal, "This medal was given to "..getPlayerName(cid).." for killing "..config.needeedkills.." "..config.monstername.." and becoming a real "..config.monstername.." hunter.")
elseif getPlayerStorageValue(cid, config.storage) < config.needeedkills-1 then
setPlayerStorageValue(cid, config.storage,(getPlayerStorageValue(cid, config.storage))+1)
doCreatureSay(cid, "You need to kill "..config.needeedkills-getPlayerStorageValue(cid, config.storage).." "..config.monstername.." to become a "..config.monstername.." hunter.", TALKTYPE_ORANGE_1)
end
end
end
return TRUE
end

tanks :p
 
function.lua add
Code:
function doSetItemSpecialDescription(uid, text)
	return doItemSetAttribute(uid, "description", tostring(text))
end
 
Back
Top