PDA

View Full Version : Undefined reference have_equipped? (KoLMafia ver 8.6)



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

Veracity
08-11-2006, 02:30 PM
"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"

Oops. Looking at the source, I see the "have_equipped" method, but I don't see the function being entered into the symbol table. That's a trivial fix, although I won't be able to get to it myself until Sunday.