Log in

View Full Version : Case Random with ObjDTM Walking



Deadly Serious
01-05-2012, 03:41 AM
I have 3 different walk paths that I want to implement into my script but I keep getting this error:
[Error] (677:5): Syntax error at line 676
Compiling failed.

Does anyone know how to fix this?




procedure WalkToAlter;
var

Path: TStringArray;
I: Integer;

Begin;
if not loggedin then exit;
FindNormalRandoms;
Antiban;
Case Random(6) Of

0: Path:= ['']; //this 0

for I := 0 to 0 do //I believe it's going wrong from the 0
ObjDTM_Walk(Path[i], 0, 100, 80, True);

Wait(1000+Random(500));



Path:= [''];

for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);


Wait(1000+Random(500));

YoHoJo
01-05-2012, 03:42 AM
Don't think you can do from 0 to 0? Is My guess?
Add more steps and make form 0 to wahtever #

Deadly Serious
01-05-2012, 03:45 AM
Don't think you can do from 0 to 0? Is My guess?
Add more steps and make form 0 to wahtever #

You can, that was from me making a random wait in between each step because it used to try and find the next walk path to early and then fail to find it.
It works fine without the case random but I want it to do multiple walk paths.

Brandon
01-05-2012, 03:56 AM
Your missing the begin and the end for your case statement... When you have multiple statements under one case, you must have a begin and an end..


Not only that but you had:

Begin; <----- That's wrong because you can't have a semi-colon after a begin..
Also no point in having a For 0 to 0 loop.. your better off with a while loop.


{$I SRL/SRL.Simba}

procedure WalkToAlter;
var

Path: TStringArray;
I: Integer;

Begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
Case Random(6) Of
0:
begin
Path:= ['']; //Your missing the begin and the end when having multiple statements under one case..

for I := 0 to 0 do //I believe it's going wrong from the 0
ObjDTM_Walk(Path[i], 0, 100, 80, True);

Wait(1000+Random(500));
end;

1:
begin

Path:= [''];

for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);


Wait(1000+Random(500));
end;
end;
end.