$game_party.actors[actor_id].agi
I don't think that will work.
actor_id is not really an actor ID, but instead the actor's position on the party (counting from zero), as Synthesize contradicted himself:
If you use an actor ID which is larger than the size of your party (minus one), it will throw an error.
Anyway, changing DASH_MAX into $game_party.actors[whatever]
will work only once since it is an constant, and even worse may cause an error if the script is executed before a game party is initialized.
Provide the original script (link will do) and someone (or I, whoever the fastest :P) will fix it.