Modified Script:
Original message follows.
Hello all,
I'm almost embarrassed to be posting this, but at least you know you'll be getting a snicker at my code's expense!
So what I'm trying to do is run a VERY basic daily script:
Ugh, I don't even know where to begin. I'm sure just by looking at this chicken-scratch, you coding geniuses can at least get a feel for what I'm trying to do. If I have over 160 adventures remaining when I run the script, I want it to work out in each of the gyms for 20 adventures, then get breakfast. If I have less than that many, I'll just have it get breakfast.
Using the 'verify' command in the CLI yields the following message:
I know my syntax is probably inexcusably horrific, this is just my first attempt at any type of ASH script. Well, unless you consider my previous version of the same script my first attempt:
But hey, that first one worked. So I'm 1 for 2 at the moment, in that case; batting a .500.
Any help or input would be appreciated! Not looking for anything fancy, just a clean up of what I have. Thanks!
Code:
if (my_adventures() > 160)
{
cli_execute("adventure 20 pump up moxie");
cli_execute("adventure 20 pump up mysticality");
cli_execute("adventure 20 pump up muscle");
}
cli_execute("breakfast");
Original message follows.
Hello all,
I'm almost embarrassed to be posting this, but at least you know you'll be getting a snicker at my code's expense!

So what I'm trying to do is run a VERY basic daily script:
Code:
if (my_adventures() > 160)
(
cli_execute("adventure 20 pump up moxie");
cli_execute("adventure 20 pump up mysticality");
cli_execute("adventure 20 pump up muscle");
);
else (continue);
cli_execute("breakfast");
Ugh, I don't even know where to begin. I'm sure just by looking at this chicken-scratch, you coding geniuses can at least get a feel for what I'm trying to do. If I have over 160 adventures remaining when I run the script, I want it to work out in each of the gyms for 20 adventures, then get breakfast. If I have less than that many, I'll just have it get breakfast.
Using the 'verify' command in the CLI yields the following message:
Script parsing error at line 2 in file /home/me/KoLmafia/breakfast.ash
Script verification complete.
I know my syntax is probably inexcusably horrific, this is just my first attempt at any type of ASH script. Well, unless you consider my previous version of the same script my first attempt:
Code:
cli_execute("breakfast");
But hey, that first one worked. So I'm 1 for 2 at the moment, in that case; batting a .500.
Any help or input would be appreciated! Not looking for anything fancy, just a clean up of what I have. Thanks!