SRL Archive - SRL Bugs

Amount.scar ~ CheckArea


Naike

2009-07-04 18:25:53

Don't work if you're in a bank after update..
Needs to be put back to the old one

{*******************************************************************************
function CheckArea(area: String): Boolean;
By: masquerader streamlined by EvilChicken!
Description: Checks if the given interface is opened.
*******************************************************************************}

function CheckArea(area: string): Boolean;
begin
case LowerCase(area) of
'inv', 'inventory': begin
Result := (BankScreen) or (ShopScreen) or (TradeScreen > 0);
if (not(Result)) then Result := GameTab(4);
end;
'shop': Result := ShopScreen;
'bank': Result := BankScreen;
'trade', 'your trade': Result := (TradeScreen > 0);
else
srl_Warn('CheckArea', Area + ' is an invalid option.', warn_AllVersions);
end;
if (Result = False) then
WriteLn('PROBLEM: ' + area + ' interface not open');
end;

The new one had
'inv', 'inventory': Result := GetCurrentTab = 4;

Which would fail at Bank as the GameTabs are disabled.

Heavenzeyez1

2009-07-04 18:29:50

You are my hero, ^^
Rep'ing again.
~Eerik~

ZephyrsFury

2009-07-04 18:37:57

From: Heavenzeyez1
You are my hero, ^^
Rep'ing again.
~Eerik~


Haha you can't rep the same person consecutively. D/w I'll help with that. <3 N1ke!

Heavenzeyez1

2009-07-04 18:42:02

From: ZephyrsFury
Haha you can't rep the same person consecutively. D/w I'll help with that. <3 N1ke!


Je, I got pwned. :D
N1ke to dev, plz? :)
~Eerik~