PDA

View Full Version : Index 8, size 8



baby_girl
04-20-2007, 03:12 PM
This script has worked for over a year with very few modifications... Now i get the error --> Index 8, size 8.... this script started with icy peak farming... then went to castle farming... and now is supposed to be farming the Gallery! BUT...the error stops it right at the point at which it should be getting the Knob goblin buffs!

I have tried versions 9.7, 10.7, 10.8, 10.9 with no luck. I have spoken to the orginal writer of this script and he could not help me with this problem so I was hoping that someone on here could?!?! please and thanks!

PS yes i know this script is very out dated so please don't remind me.

another little side note...

after ADV manually I ran the script again to drink and put on rollover gear and it worked for that!

efilnikufecin
04-20-2007, 03:25 PM
Though that script is very outdated, the castle farming version still works.

More specific details:

inside the script starting at line 387

void GoElite()
{
if(current_equipment($slot[hat]) != $item[Knob Goblin elite helm] && item_amount($item[Knob Goblin elite helm]) < 1){buy(1, $item[Knob Goblin elite helm]);}
if(current_equipment($slot[pants]) != $item[Knob Goblin elite pants] && item_amount($item[Knob Goblin elite pants]) < 1){buy(1, $item[Knob Goblin elite pants]);}
if(current_equipment($slot[weapon]) != $item[Knob Goblin elite polearm] && item_amount($item[Knob Goblin elite polearm]) < 1){buy(1, $item[Knob Goblin elite polearm]);}
cli_execute("outfit knob goblin elite guard uniform");
}

void GetKnobBuffs()
{
GoElite();
if(have_effect($effect[peeled eyeballs])< my_adventures())
{
buy(((my_adventures() - have_effect($effect[peeled eyeballs])) / 10) + 1, $item[knob goblin eyedrops]);
cli_execute("use * knob goblin eyedrops");
//use(((my_adventures() - have_effect($effect[peeled eyeballs])) / 10) + 1, $item[knob goblin eyedrops]);
}
if(have_effect($effect[heavy petting])<my_adventures())
{
buy(((my_adventures() - have_effect($effect[heavy petting])) / 10) + 1, $item[Knob Goblin pet-buffing spray]);
cli_execute("use * Knob Goblin pet-buffing spray");
//use(((my_adventures() - have_effect($effect[heavy petting])) / 10) + 1, $item[Knob Goblin pet-buffing spray]);
}
}

The knob goblin elite outfit gets equipped, but the items required are never purchased. The script seems to stop at that point.

Still working code (Before modification):

void GoElite()
{
if(current_equipment($slot[hat]) != $item[Knob Goblin elite helm] && item_amount($item[Knob Goblin elite helm]) < 1){buy(1, $item[Knob Goblin elite helm]);}
if(current_equipment($slot[pants]) != $item[Knob Goblin elite pants] && item_amount($item[Knob Goblin elite pants]) < 1){buy(1, $item[Knob Goblin elite pants]);}
if(current_equipment($slot[weapon]) != $item[Knob Goblin elite polearm] && item_amount($item[Knob Goblin elite polearm]) < 1){buy(1, $item[Knob Goblin elite polearm]);}
cli_execute("outfit knob goblin elite guard uniform");
}

void GetKnobBuffs()
{
GoElite();
if(have_effect($effect[wasabi sinuses])< my_adventures())
{
buy(((my_adventures() - have_effect($effect[wasabi sinuses])) / 10) + 1, $item[knob goblin nasal spray]);
use(((my_adventures() - have_effect($effect[wasabi sinuses])) / 10) + 1, $item[knob goblin nasal spray]);
}
if(have_effect($effect[heavy petting])<my_adventures())
{
buy(((my_adventures() - have_effect($effect[heavy petting])) / 10) + 1, $item[Knob Goblin pet-buffing spray]);
use(((my_adventures() - have_effect($effect[heavy petting])) / 10) + 1, $item[Knob Goblin pet-buffing spray]);
}
}

This "Index 8 Size 8" then stop has me stumped.

Edit: oops on Baby_girls part, that script imports another script which she forgot to attach. Here it is: http://kolmafia.us/index.php/topic,692.0.html

holatuwol
04-22-2007, 11:33 PM
I imagine the following is being printed to the debug log which was never posted:


java.lang.IndexOutOfBoundsException: Index: 8, Size: 8
at java.util.ArrayList.RangeCheck(Unknown Source)

This might be followed by a stack trace involving adding/removing/setting a visible element. I imagine it happens whenever there's an update to list models whenever the item manager is open (mine is rarely open so I don't know). So, if nothing else, try closing the item manager and the problem might go away.

I'm still digging into this issue. I'll let you know if I make any progress.

efilnikufecin
04-23-2007, 01:27 AM
As part of my assistance attempt I had her delete the debug log because it was so big that Notepad could not load it properly. I then had her restart kolmafia, and try again with the same error. Then I had her check for a debug log, and none was found. Luckily she left her computer on (her inet is down so her computer is at my house) so I checked again, and found one which I sent to my PC and am attaching now.

Edit: after examining the log, it is a 10.8 log, we can post a newer version log tomorrow.

holatuwol
04-23-2007, 06:50 AM
Interesting, today I went gallery farming using this script with more adventures than I've had in weeks, and nothing broke. Muahaha. Meaning, the issue is maybe fixed and whatever that might have fixed it will be available in the next release.