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

Windows Uh script error

Maten

New Member
Joined
Mar 16, 2009
Messages
219
Reaction score
2
this is what i have in my ultimate healing rune.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

 
function onCastSpell(cid, var)
	if doCombat(cid, combat, var) then
		doCreatureAddHealth(variantToNumber(var), math.random(900,1000))
	end
end

So why am i getting this error?
Code:
[Error - Spell Interface]
data/spells/scripts/healing/ultimate healing rune.lua:onCastSpell
Description:
(luaDoCreatureAddHealth) Creature not found

(this dose not happend when UH is on hotkey)
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, 0, 900, 0, 1000)
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Back
Top