SRL Archive - OSR Help

im such a noob


jhony6180

2012-05-22 19:47:15

Line 87
  Until(InvCount = PlusOne;) Or (TimeFromMark(TreeCounter) > 7000) 

[Error] (88:3): Semicolon (';') expected at line 87
Compiling failed.


i tried ; between every single letter just to be sure … any clues anyone ??

Main

2012-05-22 19:49:47


Until ( ( InvCount = PlusOne) Or (TimeFromMark(TreeCounter) > 7000));

That is a little overkill but it should work.

If you still get error, can you please post the 2 line before and 2 line afterwards?


EDIT:
Try to keep all the problemos on one thread :)

jhony6180

2012-05-22 19:52:49

still getting same error

here is the entire function just to be sure :P :)

function ChopTree: Boolean;
var
x, y, PlusOne, TreeCounter, TooLong: Integer;
Begin
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:=InvCount+1;
x:=MSCX
y:=MSCY
If FindObjTPA(x, y, 2897490, 10, 1, 15, 60, 600, ['cho']) Then
Begin
StatsGuise('Hooray We Found A Tree');
GetMousePos(x, y);
Case Random(2) Of
0:Mouse(x, y, 5, 5, True);
1:Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;


Flag;
If (TimeFromMark(TooLong)>30000)Then
Failsafe('Could not find tree');
MarkTime(TreeCounter);


Repeat
FindNormalRandoms;
StatsGuise('anti ban and waiting');
AntiBan;
Wait(1000);
If InvCount = PlusOne Then
WriteLn('We got one')
Until ( ( InvCount = PlusOne) Or (TimeFromMark(TreeCounter) > 7000));
End;
End;

Main

2012-05-22 19:54:23

  Wait(1000);
If InvCount = PlusOne Then
WriteLn('We got one')
Until ( ( InvCount = PlusOne) Or (TimeFromMark(TreeCounter) > 7000));
End;
End;



Writeln('We got one');

EDIT:

A little more touch up.
function ChopTree: Boolean;
var
x, y, PlusOne, TreeCounter, TooLong: Integer;
Begin
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:=InvCount+1;
x:=MSCX
y:=MSCY
If FindObjTPA(x, y, 2897490, 10, 1, 15, 60, 600, ['cho']) Then
Begin
StatsGuise('Hooray We Found A Tree');
GetMousePos(x, y);
Case Random(2) Of
0:Mouse(x, y, 5, 5, True);
1:Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;
End;
Flag;
If (TimeFromMark(TooLong)>30000)Then
Begin
Failsafe('Could not find tree');
MarkTime(TreeCounter);
End;
Repeat
FindNormalRandoms;
StatsGuise('anti ban and waiting');
AntiBan;
Wait(1000);
If InvCount = PlusOne Then
WriteLn('We got one');
Until ( ( InvCount = PlusOne) Or (TimeFromMark(TreeCounter) > 7000));
End;

Am a little OCD about standards and capitalizing the first character (got me into SOOO MUCH TROUBLE in java).

jhony6180

2012-05-22 19:58:08

lmao thanks :) i tried to keep it neat but ya know …. it gets crazy learning this been working on this same thing for 2 days haha and still failing :)

Main

2012-05-22 19:59:28

Don't feel fraid if some little thing like this doesn't work. Just post on this thread if you got more problem.

A tip thou, you need to work on your logic a little bit more, but that'll come with time :)

jhony6180

2012-05-22 20:00:27

dude … you are seriously i freakin genius … i cant believe i never spotted that -_- it now compiles correctly thanks allot :) i dunno how this rep thing works … but u is gettin sum rep lmao

Main

2012-05-22 20:02:44

You derepped me lol. But sexy :)

We encourage learning, just post here if you got more problem.

jhony6180

2012-05-22 20:04:26

derepped ?? aint the tick to give u rep ? :S :( lol i still cant get it to actually find a tree for some reason the FindTPA dont work :/ the script compiles n loads n every thing just fine tho lol

jhony6180

2012-05-22 20:08:47

u think i should just use FindObjCustom to find the colours of the tree instead of FindTPA ??