Results 1 to 4 of 4

Thread: Identifier expected????

  1. #1
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected????

    this is my script. it connects my computer to a network named marge automatically when i disconnect. i am getting an 'identifier expected error. i checked and cant see any missing begin's or end's

    PHP Code:
    program New;
    var 
    x,y,i,n,t,marge,MargeFail:integer;notify:string;


    function 
    checkspinner(output:string): string;
      
    begin
      clickmouse
    (1275,789,true)
      
    wait(700);
      
    clickmouse(1159,790,true);
      
    wait(700);
        if 
    findbitmap(MargeFail,x,ythen
          begin
          clickmouse
    (1249,527,true)
          
    result := 'CF'
          
    output := 'Connection failed! Retrying...'
          
    wait(500);
        
    end
        
    else if findcolortolerance(x,y,15200093 ,1151,782,1163,793,100then
          begin
          result 
    := 'CO'
          
    Output := 'Connection list opened'
        
    end
        
    else
          
    begin
          Result 
    := 'CU'
          
    Output := 'Connection status unknown!!   :['
          

      
    end;




    begin
      marge 
    := BitmapFromString(308'beNqtUjsShTAI9D6eJ1fwHFwj' +
           
    'V7D1GpRapjRlStsI5EPei5l5M88dC1wXWMAYpwUNxn07KKBn3q4oW' +
           
    'C0mZrJBiGCWw1iSuZXeTj9nvSceTpEUMmvQaUGOhVSEkkhB7csx+S' +
           
    'GIpSooLdCJsmE+v2bPfSJ5A79/tVbDddKnyixL5i+A3yuP5m1iMpx' +
           
    'yWd9VHm5DzzSszFZlKHCm99zsanDBevc/8LCEd8A/p+68wQ2okD7q' +
           
    '');
      
    MargeFail := BitmapFromString(2433'beNqlVcERxCAIvH7yTC3' +
           
    'Wkq9t2EJasIU887WFtJCLRAUU1Llz8lAJy7Ii3vc7Trd/zHG+C+9h' +
           
    'flnjFnfBFp3f++Y+W8D5WkzBrJXJ7+8iHMtjyiGYCcCT1xMa9wFt3' +
           
    'W3ApfF0AlAu0y5jCuRJ2edNmtEIHNiWH5J0E2oo4SD3lWtLVaLI9I' +
           
    'AwQc7EIGFV5NYL9bnsFhE6vqMT100SfzF6lchfOcbCS/hFTwQhVkF' +
           
    'wAkXisgpp0JiJ4BMvuF92y0LFfyAFTkYaEyDaXRiDjwpbVkO7es1Z' +
           
    'SAfRsKo5COF6IitasT9V306OqknlL0WfL+ypHEtPJrFKGfAWURV26' +
           
    'TbsyJqugpSEhoNB6bWKyOn5EBqjlvskSG4XLn+J0gh8UNiyGmo49h' +
           
    'RqUgCOqz7uJT27usgaw3vCt5Njtxgk/nNPzy85fgH20Z0U');

    repeat
    if findcolor(x,y,44543,1145,787,1160,793then
      begin   
    //section a
      
    clickmouse(x,y,true);
      while 
    not findbitmap(marge,x,y) do
        
    begin   //section a.a
        
    wait(100);
        
    := 1;
        if 
    600 then playsound(notify);;
      
    end;      //end section a.a
      
    clickmouse(x,y,true);
      
    wait(50)
      
    clickmouse(x,y,true);
      while 
    not findcolor(x,y,16777215,1146,788,1150,792) do //loop a.l1
        
    begin                     //a.li.a
        
    wait(100);
        
    := 1;
        
    CheckSpinner(output//<--- check to see if the network icon is loading/connecting
        
    writeln(output);     //     with blue spinning wheel from vista and windows 7

        
    if 6000 then
          begin                
    //a.li.b
          
    writeln('fail!!');
          
    //terminatescript;
          
    wait(5000);
        
    end;     //end a.li.b
      
    end;     //end a.li.a

      
    inc(n);
      
    Writeln('success ' inttostr(n));
      
    end;               //end section a
      
    until false;
    end
    Last edited by g0tp0t; 03-26-2010 at 11:41 PM.
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  2. #2
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    you were missing an end, read some tutorials about standards they make finding these errors alot easier, you also needed to add the var output i got it to compile

    i know how frustrating it can get when you try to look through your code to find a simple error and can not find it =]

    here it is
    SCAR Code:
    program New;

    var
      x, y, i, n, t, marge, MargeFail: integer;
      notify, Output: string;

    function checkspinner(output: string): string;
    begin
      clickmouse(1275, 789, true);
      wait(700);
      clickmouse(1159, 790, true);
      wait(700);
      if findbitmap(MargeFail, x, y) then
      begin
        clickmouse(1249, 527, true);
        result := 'CF' output := 'Connection failed! Retrying...'
        wait(500);
      end else
      if findcolortolerance(x, y, 15200093, 1151, 782, 1163, 793, 100) then
        begin
          result := 'CO' Output := 'Connection list opened'
        end else
         begin
          Result := 'CU' Output := 'Connection status unknown!!   :['
        end;
    end;       // you were missing an end here


    begin
          marge := BitmapFromString(30, 8, 'beNqtUjsShTAI9D6eJ1fwHFwj' +
           'V7D1GpRapjRlStsI5EPei5l5M88dC1wXWMAYpwUNxn07KKBn3q4oW' +
           'C0mZrJBiGCWw1iSuZXeTj9nvSceTpEUMmvQaUGOhVSEkkhB7csx+S' +
           'GIpSooLdCJsmE+v2bPfSJ5A79/tVbDddKnyixL5i+A3yuP5m1iMpx' +
           'yWd9VHm5DzzSszFZlKHCm99zsanDBevc/8LCEd8A/p+68wQ2okD7q' +
           '');

           MargeFail := BitmapFromString(243, 3, 'beNqlVcERxCAIvH7yTC3' +
           'Wkq9t2EJasIU887WFtJCLRAUU1Llz8lAJy7Ii3vc7Trd/zHG+C+9h' +
           'flnjFnfBFp3f++Y+W8D5WkzBrJXJ7+8iHMtjyiGYCcCT1xMa9wFt3' +
           'W3ApfF0AlAu0y5jCuRJ2edNmtEIHNiWH5J0E2oo4SD3lWtLVaLI9I' +
           'AwQc7EIGFV5NYL9bnsFhE6vqMT100SfzF6lchfOcbCS/hFTwQhVkF' +
           'wAkXisgpp0JiJ4BMvuF92y0LFfyAFTkYaEyDaXRiDjwpbVkO7es1Z' +
           'SAfRsKo5COF6IitasT9V306OqknlL0WfL+ypHEtPJrFKGfAWURV26' +
           'TbsyJqugpSEhoNB6bWKyOn5EBqjlvskSG4XLn+J0gh8UNiyGmo49h' +
           'RqUgCOqz7uJT27usgaw3vCt5Njtxgk/nNPzy85fgH20Z0U');

        repeat
          if findcolor(x, y, 44543, 1145, 787, 1160, 793) then
          begin                        //section a
            clickmouse(x, y, true);
            while not findbitmap(marge, x, y) do
            begin                     //section a.a
              wait(100);
              i := i + 1;
              if i = 600 then
                playsound(notify);
            end;                      //end section a.a
            clickmouse(x, y, true);
            wait(50) clickmouse(x, y, true);
            while not findcolor(x, y, 16777215, 1146, 788, 1150, 792) do      //loop a.l1
            begin                      //a.li.a
              wait(100);
              t := t + 1;
              CheckSpinner(output)      //<--- check to see if the network icon is loading/connecting
              writeln(output);          //     with blue spinning wheel from vista and windows 7
              if t = 6000 then
              begin                     //a.li.b
                writeln('fail!!');      //terminatescript;
                wait(5000);
              end;                      //end a.li.b
            end;                        //end a.li.a
            inc(n);
            Writeln('success ' + inttostr(n));
          end;                          //end section a
        until false;
    end.



  3. #3
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, yea, i do know standards. i just thought this would be a 10 liner :P but thanks, i layed with adding and removing ends but that never worked so i posted. it was the var ting i guess. when i added an end like u said, it wanted a colon at the last 'end;'... and that threw me off

    thsnx a ton though
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    With standards..

    SCAR Code:
    var
      x, y, i, n, t, Marge, MargeFail: Integer;

    function CheckSpinner: string;
    begin
      ClickMouse(1275, 789, True);
      Wait(700);
      ClickMouse(1159, 790, True);
      Wait(700);
      if FindBitmap(MargeFail, x, y) then
      begin
        ClickMouse(1249, 527, True);
        Result := 'CF';
        Writeln('Connection failed! Retrying...');
        Wait(500);
      end else
      if FindColorTolerance(x, y, 15200093, 1151, 782, 1163, 793, 100) then
      begin
        Result := 'CO';
        Writeln('Connection list opened');
      end else
      begin
        Result := 'CU';
        Writeln('Connection status unknown!!   :[');
      end;
    end;

    begin
      Marge := BitmapFromString(30, 8, 'beNqtUjsShTAI9D6eJ1fwHFwj' +
           'V7D1GpRapjRlStsI5EPei5l5M88dC1wXWMAYpwUNxn07KKBn3q4oW' +
           'C0mZrJBiGCWw1iSuZXeTj9nvSceTpEUMmvQaUGOhVSEkkhB7csx+S' +
           'GIpSooLdCJsmE+v2bPfSJ5A79/tVbDddKnyixL5i+A3yuP5m1iMpx' +
           'yWd9VHm5DzzSszFZlKHCm99zsanDBevc/8LCEd8A/p+68wQ2okD7q' +
           '');
           
      MargeFail := BitmapFromString(243, 3, 'beNqlVcERxCAIvH7yTC3' +
           'Wkq9t2EJasIU887WFtJCLRAUU1Llz8lAJy7Ii3vc7Trd/zHG+C+9h' +
           'flnjFnfBFp3f++Y+W8D5WkzBrJXJ7+8iHMtjyiGYCcCT1xMa9wFt3' +
           'W3ApfF0AlAu0y5jCuRJ2edNmtEIHNiWH5J0E2oo4SD3lWtLVaLI9I' +
           'AwQc7EIGFV5NYL9bnsFhE6vqMT100SfzF6lchfOcbCS/hFTwQhVkF' +
           'wAkXisgpp0JiJ4BMvuF92y0LFfyAFTkYaEyDaXRiDjwpbVkO7es1Z' +
           'SAfRsKo5COF6IitasT9V306OqknlL0WfL+ypHEtPJrFKGfAWURV26' +
           'TbsyJqugpSEhoNB6bWKyOn5EBqjlvskSG4XLn+J0gh8UNiyGmo49h' +
           'RqUgCOqz7uJT27usgaw3vCt5Njtxgk/nNPzy85fgH20Z0U');

      repeat
        if FindColor(x, y, 44543, 1145, 787, 1160, 793) then
        begin   //section a
          ClickMouse(x, y, True);
          while not FindBitmap(Marge, x, y) do
          begin   //section a.a
            Wait(100);
            Inc(i);
            if i = 600 then
              PlaySound('C:/Windows/Media/Savanna/Windows Ding.wav');
          end;      //end section a.a
          ClickMouse(x, y, True);
          Wait(50);
          ClickMouse(x, y, True);
          while not FindColor(x, y, 16777215, 1146, 788, 1150, 792) do //loop a.l1
          begin                     //a.li.a
            Wait(100);
            Inc(t);
            CheckSpinner; //<--- check to see if the network icon is loading/connecting
                          //     with blue spinning wheel from vista and windows 7
            if t = 6000 then
            begin                //a.li.b
              Writeln('Fail!');
              //TerminateScript;
              Wait(5000);
            end;     //end a.li.b
          end;     //end a.li.a
          Inc(n);
          Writeln('Success ' +IntToStr(n));
        end;               //end section a
      until False;
    end.

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
  •