Keldi
08-11-2006, 02:12 PM
Hullo!
I've got a really simple problem... KoLMafia is giving me a script error.
"Undefined reference have_equipped at line 91 in file C:\...\KoLTest.ash.* Debug log printed.
net.sourceforge.kolmafia.KoLmafiaASH$AdvancedScrip tException: Undefined reference have_equipped at line 91 in file C:\...\KoLTest.ash"* (Directory name removed manually)
I thought have_equipped was now an internal function, so I don't see why it would ever be an undefined reference...
The code in question is:
boolean funGearCheck(string itemname)
{
* item myitem = string_to_item(itemname);
* if (have_equipped(myitem))* #Line 91
* {
* * return true;*
* }
* else if (item_amount(myitem) > 0)
* {
* * if (can_equip(myitem))
* * {
* * * equip(myitem);
* * * return true;
* * }
* * else
* * {
* * * return false;
* * }
* }
* else
* {
* * return false;
* }
}
(The purpose of aforementioned code is so I can create a button to equip optimal moxie/melee damage/spell damage gear... there's more to the script than this, but this is as far as the debugger's gotten...)
Thanks for your help in advance!
-Keldi
I've got a really simple problem... KoLMafia is giving me a script error.
"Undefined reference have_equipped at line 91 in file C:\...\KoLTest.ash.* Debug log printed.
net.sourceforge.kolmafia.KoLmafiaASH$AdvancedScrip tException: Undefined reference have_equipped at line 91 in file C:\...\KoLTest.ash"* (Directory name removed manually)
I thought have_equipped was now an internal function, so I don't see why it would ever be an undefined reference...
The code in question is:
boolean funGearCheck(string itemname)
{
* item myitem = string_to_item(itemname);
* if (have_equipped(myitem))* #Line 91
* {
* * return true;*
* }
* else if (item_amount(myitem) > 0)
* {
* * if (can_equip(myitem))
* * {
* * * equip(myitem);
* * * return true;
* * }
* * else
* * {
* * * return false;
* * }
* }
* else
* {
* * return false;
* }
}
(The purpose of aforementioned code is so I can create a button to equip optimal moxie/melee damage/spell damage gear... there's more to the script than this, but this is as far as the debugger's gotten...)
Thanks for your help in advance!
-Keldi