Troll
2011-07-27 03:49:01
Well i was running a fly fisher (MSI) and when i looked back i later i see im at the lobby screen have an out of range error at line 239 in fishing.simba
line 239
whole function
and a bit of the end of the debug
P.S. MSI is great :p
line 239
findColorsTolerance(arr, fishSpot.Colors[0],
whole function
procedure MSI_WaitWhileFishing(fishSpot: TMSObject; var failed: boolean);
var
x, y, CTS, animTries, colorTries, oldInvCount, waitTime, invTimer: Integer;
idle: TAnimation;
arr: TPointArray;
begin
if ((not loggedIn) or (invFull)) then
exit;
MSI_AddHeader('MSI_WaitWhileFishing');
fishSpot.searchArea := MSI_MakeBox(point(fishSpot.x, fishSpot.y),
round(fishSpot.w / 1.75),
round(fishSpot.h / 1.75));
{$IFDEF SMART}
if (MSI_Settings[SETUP_DEBUG_SMART]) then
SMART_DrawBoxEx(true, fishSpot.searchArea, clBlue);
{$ENDIF}
idle := MSI_GetAnimation(ANIM_IDLE);
waitTime := (getSystemTime + (60000 * 3));
oldInvCount := invCount;
markTime(invTimer);
flag;
CTS := getToleranceSpeed();
MSI_Debug('Current CTS: ' + intToStr(CTS));
setColorToleranceSpeed(2);
setToleranceSpeed2Modifiers(fishSpot.hue, fishSpot.sat);
findColorsTolerance(arr, fishSpot.Colors[0],
fishSpot.searchArea.x1, fishSpot.searchArea.y1,
fishSpot.searchArea.x2, fishSpot.searchArea.y2,
fishSpot.tol);
repeat
MSI_FindRandoms(false);
// check for the "you're out of bait" text in the chat box
if (findText(x, y, 'left', NPCChars, MCX1, MCY1, MCX2, MCY2)) then
begin
MSI_Debug('We have run out of fishing bait!');
failed := true;
break;
end;
// check for the "you need tool to fish" message
if (findText(x, y, 'need', NPCChars, MCX1, MCY1, MCX2, MCY2)) then
begin
MSI_Debug('Accidentially clicked wrong fishing spot');
break;
end;
// looking for fishing spot
findColorsTolerance(arr, fishSpot.Colors[0],
fishSpot.searchArea.x1, fishSpot.searchArea.y1,
fishSpot.searchArea.x2, fishSpot.searchArea.y2,
fishSpot.tol);
if (length(arr) < fishSpot.accuracy) then
begin
MSI_Debug('Colours found < Accuracy');
inc(colorTries);
end else begin
MSI_Debug('Fishing spot found');
colorTries := 0;
end;
MSI_AntiBan(randomRange(0, 3000), ANTI_BAN_CHANCE);
if (invFull) then
begin
MSI_Debug('Inventory is full');
break;
end;
MSI_Debug('Checking inventory count');
if (timeFromMark(invTimer) > 45000) then // if no new fish in inv after 30 seconds, spot probably moved
if (oldInvCount = invCount) then
begin
MSI_SubDebug('Nothing caught for more than 45 seconds');
break;
end else begin
MSI_SubDebug('Got more fish, setting new inventory count');
oldInvCount := invCount;
markTime(invTimer);
end;
MSI_Debug('Checking player''s pixel shifting');
if (MSI_IsAnimating(idle)) then // check to see if the player is still animating
begin
MSI_SubDebug('Player isn''t animating');
inc(animTries);
end else begin
MSI_SubDebug('Player is animating');
animTries := 0;
end;
// breaks out after 3 minutes (assumes the player isn't fishing)
if (waitTime < getSystemTime) then
begin
MSI_Debug('Been fishing for 3 minutes straight, breaking as failsafe');
break;
end;
wait(randomRange(300, 700));
until((not loggedIn) or (animTries >= 10) or (colorTries > 5));
MSI_CloseHeader('MSI_WaitWhileFishing: Finished');
setColorToleranceSpeed(CTS);
setToleranceSpeed2Modifiers(0.2, 0.2);
end;
and a bit of the end of the debug
[0:39:46]: [ userEmail ] ------ Checking player's pixel shifting
[0:39:46]: [ userEmail ] -------- Player animation: Player Idle
[0:39:46]: [ userEmail ] -------- Player isn't animating
[0:39:46]: [ userEmail ] ------ Colours found < Accuracy
[0:39:46]: [ userEmail ] ------ Checking inventory count
[0:39:46]: [ userEmail ] ------ Checking player's pixel shifting
[0:39:46]: [ userEmail ] -------- Player animation: Player Idle
[0:39:46]: [ userEmail ] -------- Player isn't animating
[0:39:47]: [ userEmail ] ------ Colours found < Accuracy
[0:39:47]: [ userEmail ] ------ Checking inventory count
[0:39:47]: [ userEmail ] ------ Checking player's pixel shifting
[0:39:47]: [ userEmail ] -------- Player is animating
[0:39:48]: [ userEmail ] ------ Accidentially clicked wrong fishing spot
[0:39:48]: [ userEmail ] ---- MSI_WaitWhileFishing: Finished
[0:39:53]: [ userEmail ] ---- MSI_FindObjectTPA: FISHSPOT_LURE
[0:39:53]: [ userEmail ] ------ MSI_FilterTPADist
[0:39:53]: [ userEmail ] -------- Length (start): 0
[0:39:53]: [ userEmail ] -------- Bad elements: []
[0:39:53]: [ userEmail ] -------- New TPA: []
[0:39:53]: [ userEmail ] -------- Length (end): 0
[0:39:53]: [ userEmail ] ------ MSI_FilterTPADist: Done (16 ms)
[0:39:53]: [ userEmail ] ------ Took 94 ms to complete
[0:39:53]: [ userEmail ] ---- MSI_FindObjectTPA: False
[0:39:54]: [ userEmail ] ------ Scanning for randoms...
[0:39:54]: [Reflection] Trying to solve: Molly
[0:40:23]: [Molly] Twin ID: 3852
[0:40:32]: [Molly] Opened door!
[0:40:38]: [Molly] Found evil twin!
[0:40:42]: [Molly] 5260 - 5258
[0:40:43]: [Molly] Found evil twin!
[0:41:28]: [Reflection] Molly solved
[0:41:28]: [Reflection] Out of random
[0:41:32]: [Rewards] Reward box found
[0:41:34]: looking for box option
[0:41:34]: Found Reward Item: oins
[0:41:40]: [ userEmail ] ------ MSI_FindRandoms: Finished Random Event!
[0:41:40]: [ userEmail ] ---- MSI_WaitWhileFishing
[0:41:41]: [ userEmail ] ------ Current CTS: 1
Error: Out Of Range at line 239
The following DTMs were not freed: [Bronze Pickaxe, Iron Pickaxe, Steel Pickaxe, Mithril Pickaxe, Adamant Pickaxe, Rune Pickaxe, Dragon Pickaxe, Bronze Hatchet, Iron Hatchet, Steel Hatchet, Mithril Hatchet, Adamant Hatchet, Rune Hatchet, Dragon Hatchet, Normal Logs, Oak Logs, Willow Logs, Maple Logs, Yew Logs, Magic Logs, Clay Ore, Copper Ore, Tin Ore, Iron Ore, Silver Ore, Coal Ore, Gold Ore, Mithril Ore, Adamantite Ore, Runite Ore, Small Fishing Net, Crayfish Cage, Fishing Rod, Fishing Bait, Fly Fishing Rod, Harpoon, Lobster Pot, Raw Shrimps, Raw Crayfish, Raw Sardines, Raw Anchovies, Raw Herring, Raw Trout, Raw Pike, Raw Salmon, Raw Tuna, Raw Lobster, Raw Swordfish, Raw Shark, Cooked Shrimps, Cooked Crayfish, Cooked Sardines, Cooked Anchovies, Cooked Herring, Cooked Trout, Cooked Pike, Cooked Salmon, Cooked Tuna, Cooked Lobster, Cooked Swordfish, Cooked Shark, Uncut Sapphire, Uncut Emerald, Uncut Ruby, Uncut Diamond, Bird'S Nest, Feather, Staff Of Air, Staff Of Water, Staff Of Earth, Staff Of Fire, Air Rune, Body Rune, Mind Rune, Earth Rune, Fire Rune, Water Rune, Chaos Rune, Law Rune, Cosmic Rune, Death Rune, Nature Rune, Soft Clay, Vial, Vial Of Water, Jug, Jug Of Water, Bowl, Bowl Of Water, Bucket, Bucket Of Water, Bronze Bar, Iron Bar, Silver Bar, Steel Bar, Gold Bar, Mithril Bar, Adamant Bar, Rune Bar, SRL - Lamp bitmap, 100]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\MSI\Debug Logs\27-07-11 at 07 46 42 AM.txt] has not been freed in the script, freeing it now.
P.S. MSI is great :p