Does anyone see anythign wrong with the bold section of code?
The error i am getting is Unmatched bracket or invalid character following bracket found in index:'
The error i am getting is Unmatched bracket or invalid character following bracket found in index:'
Code:
Sub Slow(int SlowID)
/declare tempID int local ${SlowID}
/declare SlowResistCounter int local 0
/if (${ExcludeList.Find[${Spawn[${tempID}]}].CleanName}) {
/if (!${Defined[slowTimer${tempID}]}) {
/declare slowTimer${tempID} int outer -1
} else {
/varset slowTimer${tempID} 10000s
}
/return
}
[B][SIZE="5"] /if (!${AESlowed} && ${Spawn[${tempID}].NearestSpawn[2,npc radius 50.ID} && ${Spawn[${tempID}].Distance3D} < 50&& ${AddIndex} > 2 && ${Me.SpellReady[${AESlowSpell]}]}) {
/if (${Announce}) /${MyChannel} Casting ${AESlowSpell} on ${Target.CleanName}
/call Cast "${AESlowSpell}" ${AESlowGem}
/varset AESlowed 1
}[/B][/SIZE]
:RecastSlow
/if (${SlowResistCounter}>=2) /call Check_grpHPs
/if (${Target.ID}==${tempID} && ${Target.LineOfSight} && ((${Spawn[${tempID}].Distance}<=${Spell[${SlowSpell}].MyRange}) || (${Select[${SlowSpellGem},item,alt]} && ${Spawn[${tempID}].Distance}<=200))) {
/if (!${Defined[slowTimer${tempID}]}) /declare slowTimer${tempID} timer outer
/if (${Announce}) /${MyChannel} ${SlowSpell} on ${Target.CleanName}
/call Cast "${SlowSpell}" ${SlowSpellGem} 6s
/if (${SpawnCount[npc radius ${MinRadius} zradius ${NPCZRadius} noalert 1]}!=${LastSpawnCount}) /call CheckForAdds
/if (${castReturn.Equal[CAST_IMMUNE]} || ${spellNotHold}) {
/deletevar slowTimer${tempID}
/declare slowTimer${tempID} int outer -1
} else /if (${castReturn.Equal[CAST_SUCCESS]}) {
/varset slowTimer${tempID} ${SlowDuration}
| /varcalc slowTimer${tempID} ${Spell[${SlowSpell}].Duration.TotalSeconds}*9.75
} else /if (${castReturn.Equal[CAST_RESISTED]}) {
/if (${UseSecondSlow} && ${SlowResistCounter}<5 && ${Target.LineOfSight}) {
/if (${Announce}) /${MyChannel} ${SlowSpell} resisted ${SecondSlowSpell} on ${Target.CleanName}
/call Cast "${SecondSlowSpell}" ${SecondSlowSpellGem} 6s
/if (${SpawnCount[npc radius ${MinRadius} zradius ${NPCZRadius} noalert 1]}!=${LastSpawnCount}) /call CheckForAdds
/if (${castReturn.Equal[CAST_SUCCESS]}) {
/varcalc slowTimer${tempID} ${Spell[${SecondSlowSpell}].Duration.TotalSeconds}*9.5
/return
}
}
/varcalc SlowResistCounter ${SlowResistCounter}+1
/if (${SlowResistCounter}>=4) {
/varset slowTimer${tempID} 10000s
/return
} else {
/goto :RecastSlow
}
} else /if (${Select[${castReturn},CAST_OUTOFMANA,CAST_OUTOFRANGE,CAST_CANNOTSEE]}) {
/varset slowTimer${tempID} 50
}
}
/return ${Macro.Return}