The lack of a continue statement is insane IMO.
I was able to figure out how to emulate it like this... Anyone else got a solution? Using a goto feels dirty.
I was able to figure out how to emulate it like this... Anyone else got a solution? Using a goto feels dirty.
Code:
for i = 1, mq.TLO.Me.XTarget() do
if mq.TLO.Me.XTarget(i).ID() then
xtarget = mq.TLO.Me.XTarget(i).ID()
if mq.TLO.Spawn(xtarget).Type() ~= 'NPC' then goto continue end
if mq.TLO.Spawn(xtarget).PctHPs() <= LowestHps and mq.TLO.Spawn(xtarget).LineOfSight() then
LowestHps = mq.TLO.Spawn(xtarget).PctHPs()
LowestHpsID = xtarget
end
end
::continue::
end
Last edited:

