Paulix
Active Member
- Joined
- Sep 13, 2012
- Messages
- 129
- Solutions
- 7
- Reaction score
- 26
I was playing around with some spells, trying to do some combat on multi creatures...
I'm getting the following error...
The question is, how could combat:execute work when using var, and not work when using creatures from getSpectators, what am I missing?
Lua:
function onCastSpell(cid, var)
alt_targets = Game.getSpectators(Creature(var.number):getPosition(), false, false, 1, 2, 1, 2) --minRangeX, maxRangeX, minRangeY, maxRangeY
for i=1,#alt_targets do
combat:execute(cid, alt_targets[i])
end
return combat:execute(cid, var)
end
I'm getting the following error...
The question is, how could combat:execute work when using var, and not work when using creatures from getSpectators, what am I missing?