I'm working on a hobo-killing script that will cast spells until my MP is low, then switch outfits to mp regen, casting moxious maneuver until my mp is up again. Rinse, repeat. But I'm getting an odd recursion error. Here's my code:
the error I get is:
Function 'hobo_attack( )' undefined.
What am I doing wrong here? I think this should be ok. (Other hints on cleaning up my code appreciated!)
Code:
void hobo_cast() {
if (my_adventures() == 0) {
abort("Out of adventures.");
}
cli_execute("outfit Hobopolis Regen");
repeat { adventure(1 , $location[hobopolis town square]);
} until (my_mp() <= 120);
cli_execute("ccs hobo_attack");
hobo_attack();
}
void hobo_attack() {
if (my_adventures() == 0) {
abort("Out of adventures.");
}
cli_execute("outfit Hobopolis Moxie");
repeat { adventure(1 , $location[hobopolis town square]);
} until (my_mp() > 600);
cli_execute("ccs hobo_cast");
hobo_cast();
}
void main() {
cli_execute("ccs hobo_cast");
hobo_cast();
}
the error I get is:
Function 'hobo_attack( )' undefined.
What am I doing wrong here? I think this should be ok. (Other hints on cleaning up my code appreciated!)