SRL Archive - OSR Help

Simple Repeat..Until problem


Xanith

2010-12-20 00:49:01

I just started scripting again and I can't figure this error out.


[Error] (47:3): Semicolon (';') expected at line 46

Here is the Procedure.

procedure chopTrees;  //Chops Trees until invintory is full
var
x, y, i, clickColor : integer;
treesTPA : TpointArray;
treeATPA : Array of TpointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, treesTPA, 1588531, MSX1, MSY1, MSX2, MSY2, 9)
treeATPA := SplitTPA(treesTPA, 10);
repeat
for i := 0 to high(treeATPA) do
if MiddleTPAEx(treeATPA[i], x, y) then
begin
MMouse(x, y, 5, 5);
Wait(300);
if IsUpText('ree') then
begin
ClickMouse(x, y, 1);
clickColor := GetColor(x, y);
treeWait(x, y, clickColor);
//DebugATPA(treeATPA, 'c');
break;
end
end
until(InvFull);//this is the line SIMBA Highlights.
end; // Line 47

Dgby714

2010-12-20 01:00:19

You have to put ";" after all "end"s except the very last one in the entire script (Which gets a ".").

Example:
program test;

begin
if (Blankity) then
begin
Wtf;
end;
end.

So it should be:
procedure chopTrees;  //Chops Trees until invintory is full
var
x, y, i, clickColor : integer;
treesTPA : TpointArray;
treeATPA : Array of TpointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, treesTPA, 1588531, MSX1, MSY1, MSX2, MSY2, 9)
treeATPA := SplitTPA(treesTPA, 10);
repeat
for i := 0 to high(treeATPA) do
if MiddleTPAEx(treeATPA[i], x, y) then
begin
MMouse(x, y, 5, 5);
Wait(300);
if IsUpText('ree') then
begin
ClickMouse(x, y, 1);
clickColor := GetColor(x, y);
treeWait(x, y, clickColor);
//DebugATPA(treeATPA, 'c');
break;
end;
end;
until(InvFull);//this is the line SIMBA Highlights.
end; // Line 47

Quick Note: Work on your standards….

Xanith

2010-12-20 01:07:17

Wow. I completely overlooked that. Thank you.

The standards are messed up because I'm really not focusing on them right now, I'll fix them later.

Dgby714

2010-12-20 01:13:15

From: Xanith
Wow. I completely overlooked that. Thank you.

The standards are messed up because I'm really not focusing on them right now, I'll fix them later.


Your also missing another semicolon on
FindColorsSpiralTolerance(MSCX, MSCY, treesTPA, 1588531, MSX1, MSY1, MSX2, MSY2, 9)

Gu3st...

2010-12-20 14:28:43

basically, put a ; after all lines that contain text except lines that ends with a bold word minus "end" and "String"