Mac Error

jamie75

Got a gun
Joined
Oct 17, 2006
Messages
471
Reaction score
2
Points
16
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:'





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}
 
Well, I just glanced thru it, in a hurry and doing a drive-by... however, I at least see this:

/if (!${AESlowed} && ${Spawn[${tempID}].NearestSpawn[2,npc radius 50.ID} && ${Spawn[${tempID}].Distance3D} < 50&& ${AddIndex} > 2 && ${Me.SpellReady[${AESlowSpell]}]}) {
]

Your NearestSpawn is not closed, i.e., look at NearestSpawn. You got [ with a } there, but no ].

htw
 
Code:
/if (!${AESlowed} && ${Spawn[${tempID}].NearestSpawn[2,npc radius 50.ID} && ${Spawn[${tempID}].Distance3D} < 50[COLOR=red]&&[/COLOR] ${AddIndex} > 2 && ${Me.SpellReady[${AESlowSpell]}[B][COLOR=red]][/COLOR][/B]}) {
   /if (${Announce}) /${MyChannel} Casting ${AESlowSpell} on ${Target.CleanName}
   /call Cast "${AESlowSpell}" ${AESlowGem}
   /varset AESlowed 1
 }

I see 2 problems .. the bracket in red is the close for NearestSpawn. And could use a space at the &&
 
Just a helpful tool, i use Notepad++ when working macs if you highlight a "(" it will automatically highlight the corresponding ")" also helps keep things pretty. its a nice little freeware.