Bug - Not A Bug Mushroom plot broken, with workaround

SalMonella

New member
The "Mushroom Plot" function fails with this error:

Function 'string_to_int( string )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (myshroom.ash, line 18)

This is with KoLmafia v20.4 r20201.

Can be fixed by changing the two occurrences of string_to_int() in planting/myshroom.ash to to_int(). This file was last modified on 30 January 2017.
 

Veracity

Developer
Staff member
That is not a "workaround". That is a "fix".

"myshroom.ash" is not built-in to KoLmafia. Perhaps you generated it with KoLmafia, on 20 Jan 2017 - and the template we used to generate planting scripts did, in fact, used to use that obsolete function - but when I removed the obsolete functions, I also changed the template to do what you found.

I also changed several popular user-supplied planting scripts - Auto Mushroom and MaxShrooms - to have the same fix.

Sorry for the inconvenience, but you found the solution. There is nothing that KoLmafia can (or needs to) do.
 
Top