Hello,
I'm making my first script and I have been able to login etc and change the angels. I tried to get it to click a simple tree but it says compile error but I don't know where I have gone wrong? Can someone help me, I would really appreciate it.
CODE BELOW:---------------------------------------------------------
Simba Code:
program scriptTemplate;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'alpha28rs@gmail.com';
password := 'charlie2000';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
// main loop
begin
clearDebug(); // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
declarePlayers(); // Set up your username/pass
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitTreasure(); // Exit treasure hunter
Wait (randomRange(6000, 10000));
mainScreen.setAngle(MS_ANGLE_HIGH); // Make compass angle high
end;
end;
//Start Cutting 'Tree's'
procedure clickTree();
var
x, y: integer; //we need to declare these variables since findObject outputs/requires these
begin
if mainscreen.findObject(12.668, 18.496, 2849101, 22, ['ree'], MOUSE_RIGHT)
[COLOR="#FF0000"] chooseOption.select(['hop down']) // This will choose ‘Chop down’ in chooseOptions menu[/COLOR]
end;
end;
begin
clearDebug();
setupSRL();
clickTree();
end.
//Once logged in starting to chop the tree's
ERROR: Error: Operator expected at line 43
Compiling failed.