kubernik
Active Member
- Joined
- Jul 4, 2014
- Messages
- 99
- Solutions
- 7
- Reaction score
- 38
Hello, i have "little" problem..
Well... When i'm casting spell who have addEvent for example:
It is all okay, but when i do /reload spell when doCombat cannot be executed then i got crash:
When i reload it instantly then i got
test!
test!
crash
Maybe someone know solution for that, or how to clean spells addEvent on reload spells?
Well... When i'm casting spell who have addEvent for example:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 15)
setCombatArea(combat, createCombatArea({
{1, 2}
}))
function Spell(level, maglevel)
local min = -(level * 5.0+ maglevel * 12 +50)
local max = -(level * 5.0+ maglevel * 13 +50)
return min, max
end
setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "Spell")
function onCastSpell(cid, var)
addEvent(doPlayerSay, 1000*1, cid, "test!", TALKTYPE_ORANGE_1)
addEvent(doPlayerSay, 1000*2, cid, "test!", TALKTYPE_ORANGE_1)
addEvent(doCombat, 1000*3, cid, combat, var)
return true
end
#0 0x00000000006cc122 in AreaCombat::getArea(Position const&, Position const&) - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
When i reload it instantly then i got
test!
test!
crash
Maybe someone know solution for that, or how to clean spells addEvent on reload spells?