Miner.ash - Automated ore farming

Can anybody help me going over this problem: Bad skill value: "Unaccompanied Miner" (miner.ash, line 504)? I really don't want to spend 100k every time I ascend. :(
 
That's about 3 months old, and you should expect many things to not work with it. Doesn't mafia tell you to update every time you run it?
 
With the rather radical change to Cobb's Knob, I changed openlab() to simply return false. Just a head's up.
 
I keep getting the following:

> fmine

Bad location value: "Knob Goblin Harem" (miner.ash, line 164)

I have Ellsbury's Journal, the Cobb's Knob lab key, and Mining Gear equipped. I always use the most recent kolmafia build.

What am I doing wrong?
 
Last edited:
Replace "Knob Goblin Harem" with "Cobb's Knob Harem". But you also need a Menagerie key now, so you should also add "return false;" at the end of line 162.
 
But you also need a Menagerie key now, so you should also add "return false;" at the end of line 162.
Why do you need the Menagerie key? The Knob Shaft is in the lab. As far as I can tell, the only fix I need to make is to change the location name. Am I missing something?
 
Why do you need the Menagerie key? The Knob Shaft is in the lab. As far as I can tell, the only fix I need to make is to change the location name. Am I missing something?

I just have a bad memory is all :D

So simply changing the name of the location is enough.
 
I just tested this in aftercore - I only needed to visit the old man to avoid having Mafia throw an error when getting a blank page from seafloor.php, but it's just a one time thing.
Now that we have try/finally, you can add this at the top level:
PHP:
string safe_visit_url(string url, boolean post, boolean encoded) {  
   string res;  
   try { res = visit_url(url,post,encoded); }  
   finally { return res; } return res;  
} 
string safe_visit_url(string url, boolean post) { return safe_visit_url(url,post,false); } 
string safe_visit_url(string url) { return safe_visit_url(url,true,false); }
and replace
PHP:
contains_text(visit_url("seafloor.php"), "mineb.gif")
by
PHP:
contains_text(safe_visit_url("seafloor.php"), "mineb.gif")
on line 282.
 
Thank you. Question though: Are you sure that finally will be execute regardless of error condition? I thought it only tripped if there was an error. I guess then if we were worried about that, we'd need to set a variable in "try" to inform "finally" if it needs to handle an error?
 
Yup:
PHP:
try{ print("try..."); }
finally{ print("...finally"); }
results in:
Code:
> call test.ash

try...
finally

I just copied the SVN log entry for r9034.

I think that it's in a try...catch structure that the catch part is executed only in case of error.
 
Thank you. I'm glad I didn't finally try to write that entry because I would have failed to try to catch my error.
 
It was stated by Jason in that log entry that:
Nothing short of a power failure should prevent the 'finally' block from at least starting to execute. It has no protection against further presses of ESC, however.

So, that does indeed sound like it will always be executed.
 
Back
Top