Results 1 to 2 of 2

Thread: what's wrong?

  1. #1
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default what's wrong?

    here's my script
    SCAR Code:
    program CowKillah;
    {.include srl/srl.scar}

    var
    x,y,i,TheRoadColor,TheGateColor: integer;

    procedure randclick(object , option:string);
    begin
    if isuptext(object) then
    begin
      case random(4) of
        0,1,2: mouse(x,y,10,10,true);
        3: begin
             mouse(x,y,10,10,false);
             chooseoption(option);
           end
      end
    end
    end;

    procedure ToPen;
    var
    z:integer;
    begin
      Makecompass('n');
      TheRoadColor := findfallyroadColor;
      radialwalk(TheRoadColor,180,270,40,1,1);
        repeat
          radialroadwalk(TheRoadColor,165,200,50,1,1);
          Writeln('lalala');
          wait(200);
        until(findsymbolin(x,y,'tree',628,8,704,165));
      mouse(x + 10,y,10,5,true);
      flag;
      if findcolortolerance(x,y,235,628,8,705,117,20) then   mouse(x,y,5,5,true);
      repeat
        if findcolorspiral(x,y,5467001,0,0,516,338) then randclick('ate','pen');
        Z:= Z + 1;
      until(z=5 or randclick('ate','pen'));
    end;

    procedure ToBank;
    begin
    end;

    begin
    SetupSRL;
    activateclient;
    wait(2000);
    ToPen;
    end.

    i get the error Line 39: [Error] (12342:36): Type mismatch in script C:\Program Files\SCAR 3.14\Scripts\RuneScapeScripts\CowKillz.scar

    whats wrong?
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  2. #2
    Join Date
    Jun 2007
    Location
    Belgium
    Posts
    333
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program CowKillah;
    {.include srl/srl.scar}

    var
    x,y,i,TheRoadColor,TheGateColor: integer;

    Function randclick(item, option:string):Boolean;
    begin
    if isuptext(item) then
    begin
      case random(4) of
        0,1,2: mouse(x,y,10,10,true);
        3: begin
             mouse(x,y,10,10,false);
             chooseoption(option);
           end
      end
    end
    end;

    procedure ToPen;
    var
    z:integer;
    begin
      Makecompass('n');
      TheRoadColor := findfallyroadColor;
      radialwalk(TheRoadColor,180,270,40,1,1);
        repeat
          radialroadwalk(TheRoadColor,165,200,50,1,1);
          Writeln('lalala');
          wait(200);
        until(findsymbolin(x,y,'tree',628,8,704,165));
      mouse(x + 10,y,10,5,true);
      flag;
      if findcolortolerance(x,y,235,628,8,705,117,20) then   mouse(x,y,5,5,true);
      repeat
        if findcolorspiral(x,y,5467001,0,0,516,338) then randclick('ate','pen');
        Z:= Z + 1;
      until(z=5) or randclick('ate','pen');  //Needs a Boolean
    end;

    procedure ToBank;
    begin
    end;

    begin
    SetupSRL;
    activateclient;
    wait(2000);
    ToPen;
    end.

    The procedure Randclick needs to be a Boolean function if you want to use it in an repeat untill. Also, changed the variable object to item, cause object was in bold just like a begin, end, repeat, etc...meaning it is allready something of Scar

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what am i doing wrong ?:P
    By sjlou in forum OSR Help
    Replies: 2
    Last Post: 10-01-2007, 01:52 PM
  2. What am i doing wrong?
    By One Leeter in forum OSR Help
    Replies: 7
    Last Post: 06-15-2007, 10:33 PM
  3. Replies: 8
    Last Post: 03-23-2007, 04:20 PM

Posting Permissions

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