peteralto
Member
- Joined
- Nov 1, 2020
- Messages
- 93
- Solutions
- 1
- Reaction score
- 17
This appears when this boss (World Devourer) tries to create the summons:
Here is the code of data\spells\scripts\monster\devourer summon.lua
Code:
Lua Script Error: [Spell Interface]
data/spells/scripts/monster/devourer summon.lua:onCastSpell
data/spells/scripts/monster/devourer summon.lua:13: attempt to compare nil with number
stack traceback:
[C]: in function '__lt'
data/spells/scripts/monster/devourer summon.lua:13: in function <data/spells/scripts/monster/devourer summon.lua:8>
Here is the code of data\spells\scripts\monster\devourer summon.lua
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE)
local area = createCombatArea(AREA_CIRCLE2X2)
combat:setArea(area)
function onCastSpell(creature, var)
local creatures = {"Greed", "Frenzy", "Disruption"}
local monster = creatures[math.random(#creatures)]
if devourerSummon < 3 then
Game.createMonster(monster, {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true)
devourerSummon = devourerSummon + 1
end
return combat:execute(creature, var)
end