Results 1 to 14 of 14

Thread: Type mismatch in script ??

  1. #1
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Type mismatch in script ??

    Code:
    program New;
    {.include srl/srl.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}
    Var x,y:integer;
    procedure DeclarePlayers;
    begin
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active:=True;
    
    end;
    procedure AntiBan;
    begin
     if(not(LoggedIn))then
      Exit;
      case Random(8) of
      0:
      begin
      HoverSkill('Woodcutting', false);
      wait(2453+Random(432));
      end;
      1: PickUpMouse;
      2:
      Begin
       MakeCompass('N');
       wait(100+random(133));
       makecompass('S')
       wait(50+random(133));
       makecompass('N');
      end;
     end;
    end;
    procedure ChopTree;
    var x, y: integer;
    Begin
      Repeat
      if FindObj(x, y, 'hop',3426622,35)then
      Mouse(x, y, 0, 0, false);
      ChooseOption('hop');
        repeat
        wait(1200+random(250));
        Until not IsUpText('illow') or (InvFull);
      until(InvFull);
    end;
    Function banking: Boolean;
    Begin
      If(InvFull)then
      Begin
      MakeCompass('N')
      wait(300+random(160));
      OpenBankQuiet('db')
       if(FindColorSpiral(x,y, 4155248, 547, 206, 734, 464))then
      Begin
       Mouse(x,y,4,3,false);
       ChooseOption('all');
       end;
    CloseBank
      Wait(150=Random(278)); //this right here is where it says to put the mismatch thing
      end;
    end;
    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      AntiBan;
      ChopTree;
      Banking;
      Until(false)
    end.
    pwned

  2. #2
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    It has to be wait(150+random(278)); not equals

  3. #3
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OI.
    pwned

  4. #4
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    new error reads:
    Line 46: [Hint] (20052:10): Variable 'Result' never used in script C:\Documents and Settings\Jeremy\Desktop\SCAR 3.20\Scripts\first newb script.scar
    Line 69: [Error] (20075:1): Identifier expected in script C:\Documents and Settings\Jeremy\Desktop\SCAR 3.20\Scripts\first newb script.scar

    P.S
    this script is my first i have ever even attempted..
    its a mix of a few diff tuts so please bear with me >.<
    pwned

  5. #5
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    you can't have a until without an repeat

  6. #6
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    You've called an "Until", when you don't have a repeat anywhere before it. And that hint is just where you have made a function that outputs a result, but you haven't used the result at all.

  7. #7
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol.. remember im new.
    idk what any of that means
    how do i fix the until, well start there
    pwned

  8. #8
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    You've called an "Until", when you don't have a repeat anywhere before it. And that hint is just where you have made a function that outputs a result, but you haven't used the result at all.
    You can has ninja'd?

  9. #9
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well where do i put the repeat then?
    pwned

  10. #10
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by jayzarks95 View Post
    lol.. remember im new.
    idk what any of that means
    how do i fix the until, well start there
    Just remove the Until(False) line, or put a repeat with the stuff you want repeating between the Repeat and Until.

    And for the [HINT], just change it to Procedure banking; because you don't use the result (all functions give an output, while procedures don't).

    Yes Myles, Ninja'd!

  11. #11
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    woot
    okay it compiles..
    now i just need to do some radial walking tuts and add that in for the bank..
    um
    what else do i need?
    can you give me some ideas please?
    pwned

  12. #12
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Custom TPAs and DDTMs/Radial walking.

    I assume you are going for members?

    Check out the tutorial in my sig.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  13. #13
    Join Date
    Jul 2009
    Location
    scs, MI
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well as of right now, idk about trying for mems lol.
    i just want to write a script, it looks fun, i got nothing better to do...
    i got caught smoking weed and my parents grounded me from my friends for the whole summer >.<
    so i just got comp back and im like hey, lets go play RS.
    so i looked into scar...
    5 days later, here i am lol
    members would be cool...
    pwned

  14. #14
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by jayzarks95 View Post
    well as of right now, idk about trying for mems lol.
    i just want to write a script, it looks fun, i got nothing better to do...
    i got caught smoking weed and my parents grounded me from my friends for the whole summer >.<
    so i just got comp back and im like hey, lets go play RS.
    so i looked into scar...
    5 days later, here i am lol
    members would be cool...
    It is cool. And you seem like the type of person who wants to learn. You'll become a member in no time.

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
  •