zerghel
Tsuni
- Joined
- Jul 1, 2008
- Messages
- 299
- Reaction score
- 9
hello guys,
im dealing with this error on tfs 1.1
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
LuaScriptInterface::luaDoCombat(). Combat not found
stack traceback:
[C]: in function 'doCombat'
data/spells/scripts/animated/nature arrows.lua:13: in function <data/spells/scripts/animated/nature arrows.lua:11>
hope someone can gimme a hand on this
im dealing with this error on tfs 1.1
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
LuaScriptInterface::luaDoCombat(). Combat not found
stack traceback:
[C]: in function 'doCombat'
data/spells/scripts/animated/nature arrows.lua:13: in function <data/spells/scripts/animated/nature arrows.lua:11>
Lua:
local combat = {}
for i = 1, 3 do
combat[i] = createCombatObject()
setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat[i], COMBAT_PARAM_EFFECT, 21)
setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, 40)
setCombatFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, -1.5, 0, -1.6, -0)
end
function executeCombat(cid, combat, var)
if isCreature(cid) == TRUE then
doCombat(cid, combat, var)
end
end
function onCastSpell(cid, var)
local time_ = {100, 500, 1000}
for t in ipairs(time_) do
addEvent(executeCombat, time_[t], cid:getId(), combat[t], var)
end
return TRUE
end