Results 1 to 5 of 5

Thread: Anyone willing to show me some pascal?

  1. #1
    Join Date
    Feb 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default Anyone willing to show me some pascal?

    Having issues with first script.

    Code:
    program new;
    {$I SRL/SRL.Simba}
    {$I P07Include.Simba}
    {$i sps/sps.simba}
    Procedure P07_DeclarePlayer;
    Begin
      P07_PlayerName:='Booyah';
      P07_PlayerPass:='444343';
    End;
    
     Procedure StatsGuise(wat:String);
     begin
     Status(wat);
     Disguise(wat);
     End;
    
    Function ChopDown:Boolean;
    Var
    cx, cy, PlusOne, TreeCounter: Integer;
    begin
    PlusOne:= InvCount +1;
    cX := MSCX;
    cY :=MSCY;
    IF P07_FindObj(2704472, 20, 15, ['chop','down'],5)then
      begin
      StatsGuise('We found the tree');
      GetMousePos(cx, cy);
    
      Case Random(2) Of
        0:Mouse(cx, cy, 5, 5, True);
        1:begin
           Mouse(cx, cy, 5, 5, False);
           P07_ChooseOptionMulti('Hop','ree');  //WaitOption('Chop', 500);
        End;
      End;
           Repeat
           MarkTime(TreeCounter);
           Wait(1000);
           If InvCount=PlusOne then
           WriteLn('We got one');
           Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)
             end;
             end;
    
    Begin
    SetupSRL;
    P07_DeclarePlayer;
    Repeat
    ChopDown;
    until(false);
      end.
    I get this error -
    Code:
    [Error] C:\Users\ElvisB\Desktop\Simba Scripts\test1.simba(34:36): Type mismatch at line 33
    Compiling failed.
    [Error] C:\Users\ElvisB\Desktop\Simba Scripts\test1.simba(34:42): Invalid number of parameters at line 33
    Compiling failed.
    [Error] C:\Users\ElvisB\Desktop\Simba Scripts\test1.simba(34:47): Invalid number of parameters at line 33
    Compiling failed.
    [Error] C:\Users\ElvisB\Desktop\Simba Scripts\test1.simba(34:42): Invalid number of parameters at line 33
    Compiling failed.

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I'm guessing that's the line where you call, 07_FindObj. I think you should add x, y to your variables in that procedure; use those instead of the 20, 15 filled out in the 07_FindObj method call. Then MMouse, getMousePos, and choose the random case of right or left clicking.

  3. #3
    Join Date
    Feb 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    I'm guessing that's the line where you call, 07_FindObj. I think you should add x, y to your variables in that procedure; use those instead of the 20, 15 filled out in the 07_FindObj method call. Then MMouse, getMousePos, and choose the random case of right or left clicking.
    Its actually the P07_ChooseOptionMulti('Hop','ree'); method.

  4. #4
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Quote Originally Posted by Nations_collapse View Post
    Its actually the P07_ChooseOptionMulti('Hop','ree'); method.
    Err, well, for that error, assuming the Multi is a TSA, placing brackets to allow the argument to shift from 2 strings to 1 TSA should work. Ex. ...(['Hop', 'ree'])

  5. #5
    Join Date
    Feb 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    I dont think the if P07_GetUpText = ('hop') works correctly. I gave it a test, and it would hover over the color perfectly but it couldnt get past reading the up-text

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •