riwu
2012-07-29 08:25:47
There is this strange bug that CurrentBankTab returns 0 (i.e. cant detect) when you are at BankTab(2). Did some debug and here is the result:

Basically it detects all the tabs well except tab 2, and it has got nothing to do with the item of the tab because i tried with other items.
Looking into the function…

Basically it detects all the tabs well except tab 2, and it has got nothing to do with the item of the tab because i tried with other items.
Looking into the function…
function CurrentBankTab: Integer;
begin
Result := -1;
if not BankScreen then
Exit;
for Result := 1 to 9 do
if GetColor(40 + 48 * (Result - 1), 83) = 2896954 then
Exit;
Result := 0;
end; It's just grabbing a color at the respective tab (when you are at the tab, the color of the tab is slightly lighter) so i dont see why it will work for every tab but not tab 2.