Results 1 to 7 of 7

Thread: identifier expected

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default identifier expected

    ok so im making my firemaker for vaio and iget this error

    [Error] (17029:4): Identifier expected

    thats the whole error i get nothing more and the screen doesn't move so i cnat tell where it is any help


    Code:
    program New;
    {.include srl/srl.scar}
    {.include srl/srl/skill/firemaking.scar}
    
    const
      waittime= 2000;
    
    var
      matchesdtm,x,y,logDTM,BankersDTM,errors,loads: integer;
      
    procedure firemaker;
    forward;
    
    procedure loaddtms;
    begin
      disguise('loading dtms');
      BankersDTM := DTMFromString('78DA636C666660B065640001560608D8B0A69' +
             '76119508811CA67AC06AA7187F098A1627FFE3031483220A96901CAB' +
             '81150D3039471C1AF060092960C0C');
      logDTM := DTMFromString('78DA639CCAC4C0F0840105D4255A313C04D28' +
        'C40FC1F0818A703D5BC6740038C4824909E0854F391809A3E22CC' +
        'E902AA794B404D3B50CD0B22D43C25C2AEC704D47403D53C20A0A' +
        '607A8E62E0135A070BE4340CD2CA09A5B04D4CC03AAB94940CD62' +
        'CC38C550331FA8E60D116EA642BC030033D71F50');
      MatchesDTM := DTMFromString('78DA637461626078CA8002DC6C39188C80342' +
        '310FF0702463FA09A270C6880118904D2CE40353708A8B102AAB9' +
        '43408D2950CD23026ACC816A5E1350630954F39E801A1BA09A8F4' +
        '4F8EB030135DE40356F09A8F121AC0600502A11AE');
    end;
    
    procedure errortime;
    var
        i: integer;
        firecolors: array [0..3] of integer;
    
    begin
      if not LoggedIn then exit;
      makecompass('n');
      RadialRoadWalk(FindVarrockRoadColor, 180, 360, 20 + random(10), -2, 1);
      flag;
    end;
    
    
    
    
    procedure firemaker;
    var
      m,errors:integer;
    begin
      if not LoggedIn then exit;
        disguise('fire time');
        gametab(4);
        If not FindDTM(MatchesDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        begin
          writeln('please get a tinderbox and try again')
          nextplayer(false)
        end;
        repeat
          If FindDTM(MatchesDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
          Begin
            Mouse(x,y,2,2,true);
          end;
          wait(100 + random(50));
          If FindDTM(logDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
          Begin
            Mouse(x,y,2,2,true);
          end;
          begin
            MarkTime(M);
            while (TimeFromMark(M) < WaitTime) do
              Cantlightcheck;
              if CantLightCheck = true then
              begin
                inc(errors);
                errortime;
                if (errors > 1 ) then
                writeln('Failed (error fixing srry)');
              end;
            end;
      Until not FindDTM(logDTM,x,y,MIX1,MIY1,MIX2,MIY2)
    end;
    
    
    
    function Banking: Boolean;
    begin
      if not LoggedIn then exit;
      disguise('getting logs');
      MakeCompass('N')
      Wait (300 + random(160));
      OpenBankQuiet('veb');
      if (PinScreen) then
        InPin('Pin');
        Withdraw(1,1,28);
        Wait(150 + random (278));
        closebank;
        radialwalk(findvarrockroadcolor,0,90,100,1,1);
        flag;
    end;
    
    procedure getinbank;
    var
      tries:integer;
    begin
        if not LoggedIn then exit;
        disguise('in to the bank')
        if DTMRotated(BankersDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(X,Y, -2, 5, True);
        Flag;
        if not flag then
        begin
          if ( tries < 3 ) then
          begin
            writeln('could not find bank srry')
          end else;
          inc(tries)
          getinbank;
    end;
    
    
    begin
      setupsrl;
      setupfiremaking;
      activateclient;
      loaddtms;
      loads:=0;
      repeat
        errors:=0;
        tries:=0;
        getinbank;
        banking;
        firemaker;
        inc(loads);
      until(loads = 12)//change to w/e needed i dont have the main script so idk what it is
    end.

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    You're missing an end in getinbank.
    :-)

  3. #3
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Code:
    procedure getinbank;
    begin
        if not LoggedIn then exit;
        disguise('in to the bank')
        if DTMRotated(BankersDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(X,Y, -2, 5, True);
        Flag;
        if not flag then
        begin
          if ( tries < 3 ) then
          begin
            writeln('could not find bank srry')
          end else
          begin
            inc(tries)
            getinbank;
          end;
        end;
    end;
    change it to that
    and add the "tries" to global vars
    Last edited by x[Warrior]x3500; 05-10-2009 at 08:27 AM.

  4. #4
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    ok but arne't global vas not supposed to be used unless its used in 2 procedures cause "tries" is only in that one procedure

  5. #5
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    ok but arne't global vas not supposed to be used unless its used in 2 procedures cause "tries" is only in that one procedure
    "tries" is used in the proc AND the main loop. thus u need it to be in globals

  6. #6
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    opps srry i changed it alittle right b4 i posted it srry

    Code:
    program New;
    {.include srl/srl.scar}
    {.include srl/srl/skill/firemaking.scar}
    
    const
      waittime= 2000;
    
    var
      matchesdtm,x,y,logDTM,BankersDTM,loads: integer;
      
    procedure firemaker;
    forward;
    
    procedure loaddtms;
    begin
      disguise('loading dtms');
      BankersDTM := DTMFromString('78DA636C666660B065640001560608D8B0A69' +
             '76119508811CA67AC06AA7187F098A1627FFE3031483220A96901CAB' +
             '81150D3039471C1AF060092960C0C');
      logDTM := DTMFromString('78DA639CCAC4C0F0840105D4255A313C04D28' +
        'C40FC1F0818A703D5BC6740038C4824909E0854F391809A3E22CC' +
        'E902AA794B404D3B50CD0B22D43C25C2AEC704D47403D53C20A0A' +
        '607A8E62E0135A070BE4340CD2CA09A5B04D4CC03AAB94940CD62' +
        'CC38C550331FA8E60D116EA642BC030033D71F50');
      MatchesDTM := DTMFromString('78DA637461626078CA8002DC6C39188C80342' +
        '310FF0702463FA09A270C6880118904D2CE40353708A8B102AAB9' +
        '43408D2950CD23026ACC816A5E1350630954F39E801A1BA09A8F4' +
        '4F8EB030135DE40356F09A8F121AC0600502A11AE');
    end;
    
    procedure errortime;
    var
        i: integer;
        firecolors: array [0..3] of integer;
    
    begin
      if not LoggedIn then exit;
      makecompass('n');
      RadialRoadWalk(FindVarrockRoadColor, 180, 360, 20 + random(10), -2, 1);
      flag;
    end;
    
    
    
    
    procedure firemaker;
    var
      m,errors:integer;
    begin
    errors:=0;
      if not LoggedIn then exit;
        disguise('fire time');
        gametab(4);
        If not FindDTM(MatchesDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        begin
          writeln('please get a tinderbox and try again')
          nextplayer(false)
        end;
        repeat
          If FindDTM(MatchesDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
          Begin
            Mouse(x,y,2,2,true);
          end;
          wait(100 + random(50));
          If FindDTM(logDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
          Begin
            Mouse(x,y,2,2,true);
          end;
          begin
            MarkTime(M);
            while (TimeFromMark(M) < WaitTime) do
              Cantlightcheck;
              if CantLightCheck = true then
              begin
                inc(errors);
                errortime;
                if (errors > 1 ) then
                writeln('Failed (error fixing srry)');
              end;
            end;
      Until not FindDTM(logDTM,x,y,MIX1,MIY1,MIX2,MIY2)
    end;
    
    
    
    function Banking: Boolean;
    begin
      if not LoggedIn then exit;
      disguise('getting logs');
      MakeCompass('N')
      Wait (300 + random(160));
      OpenBankQuiet('veb');
      if (PinScreen) then
        InPin('Pin');
        Withdraw(1,1,28);
        Wait(150 + random (278));
        closebank;
        radialwalk(findvarrockroadcolor,0,90,100,1,1);
        flag;
    end;
    
    procedure getinbank;
    var
      tries:integer;
    begin
        tries:=0;
        if not LoggedIn then exit;
        disguise('in to the bank')
        if DTMRotated(BankersDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(X,Y, -2, 5, True);
        Flag;
        if not flag then
        begin
          if ( tries < 3 ) then
          begin
            writeln('could not find bank srry')
          end else;
          inc(tries)
          getinbank;
         end;
    end;
    
    
    begin
      setupsrl;
      setupfiremaking;
      activateclient;
      loaddtms;
      loads:=0;
      repeat
        getinbank;
        banking;
        firemaker;
        inc(loads);
      until(loads = 12)//change to w/e needed i dont have the main script so idk what it is
    end.
    btw is that what u meant by adding fails afes and is there anything else i could do to make it better

  7. #7
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    anything else i could do to make it better
    release the DTMs after use. don't have a DTM Proc. just include the individual DTMs in the proc they are used for and at the end of the proc use freedtm()

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
  •