Results 1 to 6 of 6

Thread: need help please

  1. #1
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    need help please

    hi
    i have this script:
    SCAR Code:
    program New;
    var
      comcri,sumary,Temp,suc,tal,failed,jailed,crimenow,x,y,a,b,c,h,j,s,d,F,Su,Ja : integer;
      ChatChars,GTAnow : integer;
      Doller : string;
      Doller2 : extended;

    Procedure Fail;
    begin
    Failed := BitmapFromString(39, 10, 'beNpjYICA/zCEHyCrIUY9HhOI' +
           '1z4gluJyAKm60BBWKWJ8iksLAw5b8LsZl0UEHYBfiki30dRSIk3AE' +
           'x30tJSY9EY7SwkGCFXilMjUC2UDAOraoV8=');
           if(FindBitmap(failed,x,y))then
           begin
           F := F+1;
           end else
           begin
           end;
    end;

    Procedure Succ;
    begin
    suc := BitmapFromString(87, 13, 'beNrtlcESgCAIRPf/f5pOHSqBB' +
           'dSZCsZD7QjCixB4ncm5mG3P5w8YX05DSECQ6xo6Dl+lrIdcNMUt3K' +
           '1Lo0TGB5ESHwpBfS4EKUCoZG6fLrsgwOzGiRCYtoen1yEYLYrITCh' +
           '2QujiS0yqCgQ3yIqZEGXI/1n2VxPF19656HbI6UySIQi/tYbQBO4Q' +
           'DnOZMd0=');
           if(FindBitmap(suc,x,y))then
           begin
           Su := Su+1
           ChatChars := LoadChars2(AppPath + 'Fonts\StateOfCrime');
           Doller := GetTextAtEx(907, 253, 20, ChatChars, False, False, 0, 0, -1, 200, True, tr_AllChars);
           end else
           begin
           end;
    end;

    Procedure Jail;
    begin
    jailed := BitmapFromString(39, 13, 'beNq9U0EKACAI8/+fXlAQRZ' +
           'RDl8Obm1MzswH0cLHSSEm+gtbUquRThaMC9mAmvUnOFLOrG81tIJZ' +
           '696Y1DdBA71BuytzbP1N3IZI3Ja9X8tOTKDZF/ZgN5VejXQ==');
           if(FindBitmap(jailed,x,y))then
           begin
           Ja := JA+1
           end else
           begin
           end;
    end;

    Procedure OutPut;
    begin
    Fail;
    Succ;
    Jail;
    Temp := Su+F+Ja;
    WriteLn('');
    WriteLn('Successfully attemps: ' + IntToStr(Su));
    WriteLn('Failed attemps: ' + IntToStr(F));
    WriteLn('Jailed attemps: ' + IntToStr(Ja));
    WriteLn('Times runned: ' + IntToStr(Temp));
    end;

    Procedure Safe;
    begin
    if (FindColor(s,d,13421823,400,600,900,800))then
    begin
    Exit;
    end;
    end;

    Procedure Summary;
    begin
    sumary := BitmapFromString(51, 9, 'beNpjYACCmTDAMJgAsnsGld' +
           'uwOgara2ciAazhTFABLl1oJDIXq2JMh1GoAKvfka3GahRBK6jiMLR' +
           'QxR87dHMYQUHMAMSTGOgZYoMwDw5yVyEcBgD1V63s');
           if(FindBitmap(sumary,x,y))then
           begin
           ClickMouse(x,y,true);
           a := 1;
           c := 0;
           end else
           begin
           Wait(5000);
           end;
    FreeBitmap(sumary);
    end;

    procedure DoCrime;
    begin
    crimenow := BitmapFromString(36, 7, 'beNpTViYSMDAwwNkzZ87Ey' +
           'qYWQLMLbgWpdv2HATRB/P5CJpHdgMvXQDaymbjYxNiF1Qo0lf9RAU' +
           'nxhSsw8diFK2BJSht4gg5ZBKu/SLULa3yh2AUAClHPjg==');
           if(FindBitmap(crimenow,x,y))then
           begin
           x := x+10;
           y := y+5;
           MoveMouse(x,y);
           Wait(100);
           ClickMouse(x,y,true);
           b := 1;
           end else
           begin
           Wait(1);
           end;
    FreeBitmap(crimenow);
    end;

    procedure DoGTA;
    begin
    GTAnow := BitmapFromString(37, 7, 'beNqtkcsJADAIQ93FqZ3WHgT' +
           'xTy3NQVIQn6mIKmbGUQCgnohKfylhzcSAU8ovXHjmdLbaNbrs4u3Y' +
           'zt/gSkruZK/V7bpfnXFv6crJnc+sQNniyts53AHlcNUB');
           if(FindBitmap(GTAnow,x,y))then
           begin
           x := x+10;
           y := y+5;
           MoveMouse(x,y);
           Wait(100);
           ClickMouse(x,y,true);
           b := 1;
           end else
           begin
           end;
    FreeBitmap(GTAnow);
    end;

    Procedure ValgCrime;
    begin
    if (c > 60)then
      begin
        Summary;
      end else
      begin
        DoCrime;
        DoGTA;
      end;
    end;


    procedure BegaCrime;
    begin
    Safe;
    begin
    comcri := BitmapFromString(106, 19, 'beNrtmNENgCAMRN2F' +
           'oUjcf4/6ZwjY2hYqTbxLfySEO18qGEqBJlXPinLUTe+AjAI90AO9U' +
           'USUcKkZetQoCcYtkRz0unifpRWMdkWy0lM2ANcSvglya71SbRdXmn' +
           'KDcfTGV+YGfRM4aznS2lR/o/f4qDHVb6Sgp/SKOzV20VNGyvDlyr8' +
           'H3J6/EK/QgbK7yTTo1IBAD/Ry0kO57/cgpy7NTUGb');
           if(FindBitmap(comcri,h,j))then
           begin
           h := h+12;
           j := j+7;
           ClickMouse(h,j,true);
           end else
           begin
           Summary;
           end;
    end;
    Wait(5000);
    end;

    begin
    b := 0;
    c := 0;
    repeat
    if (b = 0)then
    begin
      ValgCrime;
    end;
    until(b = 1);
    begin
      BegaCrime;
      OutPut;
      a:=0;
      repeat
      summary;
      until(a=1);
      Wait(5000);
      until(false);
      end;
    end.

    it says: Line 190: [Error] (190:1): Identifier expected in script

    its wery annoying
    im sur its just a stupid mistake, but still i cant figure out why it says that

    please help me

    //Batnas
    p.s. sorry for the mess in the script, and i have a lot og unused integers

  2. #2
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    you miss 1 Repeat in your mainloop.

    1 until allways needs 1 repeat before it

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

    Default

    In your mainloop you have 2 repeats and 3 untill
    SCAR Code:
    begin
    b := 0;
    c := 0;
    repeat     //1
    if (b = 0)then
    begin
      ValgCrime;
    end;
    until(b = 1);    //1
    begin
      BegaCrime;
      OutPut;
      a:=0;
      repeat     //2
      summary;
      until(a=1);    //2  
      Wait(5000);
      until(false);   //3
      end;
    end.

    Take out the until(a=1); and put a repeat; until(a=1); loop in the procedure summary

    EDIT: Doh!!!! Masterkill beat me to it

  4. #4
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you, but have you tried ad take it to scar and then run it??
    i still get that mising identifier error

    //Batnas

  5. #5
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    var
      comcri,sumary,Temp,suc,tal,failed,jailed,crimenow,x,y,a,b,c,h,j,s,d,F,Su,Ja : integer;
      ChatChars,GTAnow : integer;
      Doller : string;
      Doller2 : extended;

    Procedure Fail;
    begin
    Failed := BitmapFromString(39, 10, 'beNpjYICA/zCEHyCrIUY9HhOI' +
           '1z4gluJyAKm60BBWKWJ8iksLAw5b8LsZl0UEHYBfiki30dRSIk3AE' +
           'x30tJSY9EY7SwkGCFXilMjUC2UDAOraoV8=');
           if(FindBitmap(failed,x,y))then
           begin
           F := F+1;
           end else
           begin
           end;
    end;

    Procedure Succ;
    begin
    suc := BitmapFromString(87, 13, 'beNrtlcESgCAIRPf/f5pOHSqBB' +
           'dSZCsZD7QjCixB4ncm5mG3P5w8YX05DSECQ6xo6Dl+lrIdcNMUt3K' +
           '1Lo0TGB5ESHwpBfS4EKUCoZG6fLrsgwOzGiRCYtoen1yEYLYrITCh' +
           '2QujiS0yqCgQ3yIqZEGXI/1n2VxPF19656HbI6UySIQi/tYbQBO4Q' +
           'DnOZMd0=');
           if(FindBitmap(suc,x,y))then
           begin
           Su := Su+1
           ChatChars := LoadChars2(AppPath + 'Fonts\StateOfCrime');
           Doller := GetTextAtEx(907, 253, 20, ChatChars, False, False, 0, 0, -1, 200, True, tr_AllChars);
           end else
           begin
           end;
    end;

    Procedure Jail;
    begin
    jailed := BitmapFromString(39, 13, 'beNq9U0EKACAI8/+fXlAQRZ' +
           'RDl8Obm1MzswH0cLHSSEm+gtbUquRThaMC9mAmvUnOFLOrG81tIJZ' +
           '696Y1DdBA71BuytzbP1N3IZI3Ja9X8tOTKDZF/ZgN5VejXQ==');
           if(FindBitmap(jailed,x,y))then
           begin
           Ja := JA+1
           end else
           begin
           end;
    end;

    Procedure OutPut;
    begin
    Fail;
    Succ;
    Jail;
    Temp := Su+F+Ja;
    WriteLn('');
    WriteLn('Successfully attemps: ' + IntToStr(Su));
    WriteLn('Failed attemps: ' + IntToStr(F));
    WriteLn('Jailed attemps: ' + IntToStr(Ja));
    WriteLn('Times runned: ' + IntToStr(Temp));
    end;

    Procedure Safe;
    begin
    if (FindColor(s,d,13421823,400,600,900,800))then
    begin
    Exit;
    end;
    end;

    Procedure Summary;
    begin
    sumary := BitmapFromString(51, 9, 'beNpjYACCmTDAMJgAsnsGld' +
           'uwOgara2ciAazhTFABLl1oJDIXq2JMh1GoAKvfka3GahRBK6jiMLR' +
           'QxR87dHMYQUHMAMSTGOgZYoMwDw5yVyEcBgD1V63s');
           if(FindBitmap(sumary,x,y))then
           begin
           ClickMouse(x,y,true);
           a := 1;
           c := 0;
           end else
           begin
           Wait(5000);
           end;
    FreeBitmap(sumary);
    end;

    procedure DoCrime;
    begin
    crimenow := BitmapFromString(36, 7, 'beNpTViYSMDAwwNkzZ87Ey' +
           'qYWQLMLbgWpdv2HATRB/P5CJpHdgMvXQDaymbjYxNiF1Qo0lf9RAU' +
           'nxhSsw8diFK2BJSht4gg5ZBKu/SLULa3yh2AUAClHPjg==');
           if(FindBitmap(crimenow,x,y))then
           begin
           x := x+10;
           y := y+5;
           MoveMouse(x,y);
           Wait(100);
           ClickMouse(x,y,true);
           b := 1;
           end else
           begin
           Wait(1);
           end;
    FreeBitmap(crimenow);
    end;

    procedure DoGTA;
    begin
    GTAnow := BitmapFromString(37, 7, 'beNqtkcsJADAIQ93FqZ3WHgT' +
           'xTy3NQVIQn6mIKmbGUQCgnohKfylhzcSAU8ovXHjmdLbaNbrs4u3Y' +
           'zt/gSkruZK/V7bpfnXFv6crJnc+sQNniyts53AHlcNUB');
           if(FindBitmap(GTAnow,x,y))then
           begin
           x := x+10;
           y := y+5;
           MoveMouse(x,y);
           Wait(100);
           ClickMouse(x,y,true);
           b := 1;
           end else
           begin
           end;
    FreeBitmap(GTAnow);
    end;

    Procedure ValgCrime;
    begin
    if (c > 60)then
      begin
        Summary;
      end else
      begin
        DoCrime;
        DoGTA;
      end;
    end;


    procedure BegaCrime;
    begin
    Safe;
    begin
    comcri := BitmapFromString(106, 19, 'beNrtmNENgCAMRN2F' +
           'oUjcf4/6ZwjY2hYqTbxLfySEO18qGEqBJlXPinLUTe+AjAI90AO9U' +
           'USUcKkZetQoCcYtkRz0unifpRWMdkWy0lM2ANcSvglya71SbRdXmn' +
           'KDcfTGV+YGfRM4aznS2lR/o/f4qDHVb6Sgp/SKOzV20VNGyvDlyr8' +
           'H3J6/EK/QgbK7yTTo1IBAD/Ry0kO57/cgpy7NTUGb');
           if(FindBitmap(comcri,h,j))then
           begin
           h := h+12;
           j := j+7;
           ClickMouse(h,j,true);
           end else
           begin
           Summary;
           end;
    end;
    Wait(5000);
    end;

    begin
      b := 0;
      c := 0;
      repeat
        if (b = 0)then
        begin
          ValgCrime;
        end;
      until(b = 1);
      begin
        BegaCrime;
        OutPut;
        a:=0;
        repeat
          summary;
        until(a=1);
        Wait(5000);
      end;
    end.

    SCAR Code:
    Successfully compiled
    Line 3: [Hint] (3:1): Variable 'TAL' never used in script
    Line 6: [Hint] (6:1): Variable 'DOLLER2' never used in script

  6. #6
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks a lot!!!!
    it works now
    thank you

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
  •