SRL Archive - Discussions and Debates

** Warning in GameTab: 4 does not exist**


king vash

2008-04-05 14:26:23

everytime I open a bank i get 50 of these, I know it's from the new revision and I know it could be nice some times, but is their a way of disabling it, short of simply removing the line that gives the warning?


Using Step into I found the problem inside either DepositAll; but that only calls Deposit(1,28,True); and Deposit doesn't call GameTabs, what's up?

king vash

2008-04-05 16:48:02

Okay I solved the Problem,

if you use something like this you will have issues,

If BankScreen then DepositAll;
DepositAll -> Desposit(1,28,True)

an exerp from Deposit

For I := 1 To 28 Do
Begin
If Not ExistsItem(I) Then

and then ExistsItem

begin
GameTab(4);
TB := InvBox(i);
Result := FindColor(x, y, 65536, TB.x1 + 5, TB.y1 + 5, TB.x2 - 5, TB.y2 - 5);
end;


This can be fixed quite easily in gametabs be doing something like this

if not (TabExists(tabnumber) or BankScreen or ShopScreen or TradeScreen or TradeScreen2) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' does not exist', warn_AllVersions);
Result := False;
Exit;
end;

with a disadvatage that BankScreen, ShopScreen, TradeScreen, and TradeScreen2 will be called ever time GameTab is called

So it could be changed to this (looks less pretty but is better)

if not TabExists(tabnumber) then
if not (BankScreen or ShopScreen or TradeScreen or TradeScreen2)
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' does not exist', warn_AllVersions);
Result := False;
Exit;
end;

Sir R. M8gic1an

2008-04-05 17:12:26

nice fix, i'll report this to get a mod to move it to SRL Development.

~RM

Wizzup?

2008-04-05 17:51:32

Read my post at the Official thread. :)
http://www.srl-forums.com/forum/showpost.php?p=378281&postcount=2

It's an easier fix… And you don't have to mess with GameTab alot. :)

PriSoner

2008-04-07 12:43:46

It may be a harmless bug but it's extremelly anoying.. It pops up everyhwere all the time, completely clogs up the debig window, and generates loads of lame posts from users telling you about the warnings you have already told them to ignore.

Wizzup?

2008-04-07 13:15:18

From: PriSoner
It may be a harmless bug but it's extremelly anoying.. It pops up everyhwere all the time, completely clogs up the debig window, and generates loads of lame posts from users telling you about the warnings you have already told them to ignore.


Then it might be an option to do as I suggested you should do in the post above your post?

PriSoner

2008-04-07 13:18:47

It is an option for me, but not an option for most SRL junior members and it's them that I get most of the greaf off when they see the errors in my script.. I have managed to get rid of most of them, around banking, but not all.. :(

Wizzup?

2008-04-07 13:27:25

From: PriSoner
It is an option for me, but not an option for most SRL junior members and it's them that I get most of the greaf off when they see the errors in my script.. I have managed to get rid of most of them, around banking, but not all.. :(


Which is why the fix will be in SRL #16. ;)