string check_version(string soft, string prop, string thisver, int thread) { int w = 1; string page; matcher find_ver;
string check_version(string soft, string prop, string thisver, int thread) { int w = 10; string page; matcher find_ver;
Function 'to_phylum( string )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts (zlib.ash, line 77)
gCLI said:> zlib spaaace_othergoal = distention pill
Running ZLib version: r31 (current)
No setting named 'spaaace_othergoal' exists.
gCLI said:> ashq import zlib; setvar("spaaace_othergoal", $item[none]);
spaaace_othergoal could not be found ()
setvar("spaaace_othergoal", $item[none]); // set to e.g. distention pill or synthetic dog hair pill.
boolean config_vars = false;
if(!(vars contains newvar))
config_vars = true;
setvar(newvar, "DATA");
if(config_vars)
abort("newvar was just added as a zlib variable. Please configure it now and then restart this script.");
The "ashq trick" didn't work for you because you didn't quote the name of the file being imported - single quotes, double quotes, or angle brackets are accepted. The unquoted form of the import statement has to be the only thing on the line, which isn't possible in an ashq command.
ashq import nemesis; nemesis_Disco_Bandit();
Just in case this helps you: the suggested design for using setvar() is to put them at top level just above your main(), followed immediately by check_version(). This way they are not at the top of your script and thus won't trick users into thinking they can edit them in the script, and a first-time user can run the script and have a few seconds to abort during version checking after the vars have been set, in the case that they would like to configure any of the settings to non-default values.
That sounds like an action to be taken by the script calling zlib. Something like:
PHP:boolean config_vars = false; if(!(vars contains newvar)) config_vars = true; setvar(newvar, "DATA"); if(config_vars) abort("newvar was just added as a zlib variable. Please configure it now and then restart this script.");