Stat Booster User.

I have a tendency to hoard sub stat boosters. I never check my inventory for them...

So I thought I would write a simple script for it.

Well, I can't write a simple script anymore... :p

After a few mutations, the following code block is what I came up with.

Problem is, it errors out. No message, just turns the side panel red, and aborts. I put in a few print commands to try and see where the problem might be, and even the first one doesn't get printed.

So I am at a loss. I have looked at it so long my eyes are crossing. So I figured I would throw it up here so other scripters can look it over and maybe notice why Mafia tells me to go F myself everytime I try and run it.

Note: I am aware that it would error out it I had reached my limit on spleen items... But I would think that give me a message. After rollover, I will try it again just to make sure - but I would bet good meat that it will error out again.
 
Re: WIP: Stat Booster User.

Hah! I found the typo. The script now works, and is available for use.

It can be imported, or run on its own.

It goes through your substat boosters (moxie weed, concentrated magicalness pill, enchanted barbell, and such) and uses them for your main stat, then each other stat, from the most gain to the least gain.

I do hope that is more clear that it reads to me...

Enjoy.

Oh, Note: It will not function fully if you have taken any spleen hits that day.
 

Attachments

  • StatBoosterASH.ash
    3.4 KB · Views: 147
Hmm, now I have a question! Where was the typo? The info may help to diagnose future mistakes. When a programming tool (effectively what KOLMafia is) goes into error state without giving a message what the error is, it can be very hard to locate. If you post details, it may prove usefull to all of us, and Holatuwol might add an error message into the next release. :)
 
[quote author=efilnikufecin link=topic=54.msg183#msg183 date=1144312586]
Hmm, now I have a question! Where was the typo? The info may help to diagnose future mistakes. When a programming tool (effectively what KOLMafia is) goes into error state without giving a message what the error is, it can be very hard to locate. If you post details, it may prove usefull to all of us, and Holatuwol might add an error message into the next release. :)
[/quote]

The typo was that I assigned data to a variable with "= =". (A silly typo causes by copy & paste.)

After I fixed that, mafia pointed out one more typo, and the script then worked.

Oh... I just realized. In my elation over the typo being found, I forgot to take out the "debugging" print commands. After I clean up the script for "public" use I will update it again.
 
Top