Hello people! I'm trying to add banking to one of my scripts and i looked the command withdraw in function list and it showed me an example. i copyed it and when i try to compile the script it says
Simba Code:
[Error] (76:10): Duplicate identifier 'WITHDRAW' at line 75
Compiling failed.
Here is the code
Simba Code:
program Bonfire;
{$i SRL\SRL.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
Players[0].Member := True;
Players[0].Pin := '1999';
end;// declare players
function OpenBankNPCEx :Boolean;
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
TempCTS, C, HiNPC, II, I :Integer;
begin
Result := False;
Result := (BankScreen) or (PinScreen);
If Result then Exit;
NPCArray := GetMinimapDots('NPC');
HiNPC := High(NPCArray);
If Length(NPCArray) = 0 then Exit;
SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for I := 0 to HiNPC do
begin
NPCPoint := MMToMS(NPCArray[I])
If NPCPoint = Point(-1, -1) then Continue;
NPCBox := IntToBox(NPCPoint.X - 40, NPCPoint.Y - 40, NPCPoint.X + 40, NPCPoint.Y + 40)
If PixelShift(NPCBox, 200) > 500 then Continue;
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 1.52);
FindColorsTolerance(Colors, 6067652, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 13);
ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);
for II := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[II]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);
If WaitUpTextMulti(['ooth', 'anker'], 200) then
begin
Mouse(MSNPC.X, MSNPC.Y, 1, 1, False);
If WaitOptionMulti(['ank B', 'quick'], 300) then
MarkTime(c);
Begin
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then //
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If Result then
begin
ColorToleranceSpeed(TempCTS);
Exit;
end
else
ColorToleranceSpeed(TempCTS);
end;
end;
end;
end;
end;
function Withdraw(2, 1, 5: Integer): Boolean; // This line is highlighted when it shows error in debug box
begin
Result := WithdrawEx(2, 1, 5,[]);
end;
begin
SetupSRL;
OpenBankNPCEx;
withdraw;
end.