SRL Archive - SRL Bugs

GameTab Bug.


Brandon

2012-03-04 02:33:24

When using gametab.. There is a slight chance that it messes up and switches to some random tab..

GameTab(TAB_INV).. if already on the Inv tab, sometimes it switches to the music tab then back.. does this very often now whereas before it was rare enough for me to not report it..

Other tabs do this as well..

Coh3n

2012-03-04 02:39:39

Moved to the bugs section.

This may have something to do with the false negatives tabExists was giving. It's fixed in the new_randoms branch. I haven't pushed that commit to master yet because I was unsure if it would really mess things up.

Try this tabExists and let me know how it goes.

function TabExists(Tab: Integer): Boolean;
var
tP: TPoint;
begin
Result := false;
if (not loggedIn) then
exit;

if (tab < 20) then
begin
SRL_Warn('TabExists', 'Tab ' + IntToStr(Tab) + ' is not using the new constants! Please upgrade your script.', warn_AllVersions);
Exit;
end;

if (not(InRange(Tab, Tab_Combat, Tab_LogOut))) then
begin
SRL_Warn('TabExists', 'Tab ' + IntToStr(Tab) + ' is not a valid tab number.', warn_AllVersions);
Exit;
end;

if (Tab = tab_Inv) then
if BankScreen then
begin
Result := True;
Exit;
end;

if (Tab = tab_LogOut) then
begin
Result := (GetColor(746, 0) = 65536);
Exit;
end;

tP := Point(((Tab - 21) mod 8 * 30) + 537, ((Tab - 21) div 8 * 298) + 186);
Result := (CountColorTolerance(5005422, tp.x-12, tp.y-12, tp.x+12, tp.y+12, 55) < 600); // the count when no icons are overlapping the GameTab.
end;

Brandon

2012-03-04 13:41:32

Confirmed and Thank you. Might want to push that soon :)

Coh3n

2012-03-05 20:19:12

It's resolved in the latest version. :)

Brandon

2012-03-05 20:23:36

From: Coh3n
It's resolved in the latest version. :)


Uhh if u just pushed it.. then it'll take an hr to get through because I just got this happening to me again after overriding an update. So good to hear but the copy paste above works :)

Brandon

2012-03-12 00:03:20

Ahh this bug exists again.. Only that it hovers over the ClanChat or little Yellow MSN looking icon at the bottom of the screen.. Constantly doing this and sometimes even staying there for 10-20 seconds on the spot..

Coh3n

2012-03-12 00:38:06

From: ggzz
Ahh this bug exists again.. Only that it hovers over the ClanChat or little Yellow MSN looking icon at the bottom of the screen.. Constantly doing this and sometimes even staying there for 10-20 seconds on the spot..
How is that related at all? It seems like a completely different issue. More information may be helpful.

E: TabExists was rewritten, so I don't think it's that. Could be something in GameTab() though. Can you reproduce it?

E2: I accidentally had it setting CTS2 instead of CTS1. Try the latest SRL and see if it still happens.