Results 1 to 5 of 5

Thread: errors hate me ='[.. indentifier/ semicolon expected

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default errors hate me ='[.. indentifier/ semicolon expected

    my own functions got to complex for me, so i cant figure out what/ where/ how to fix my error

    SCAR Code:
    function findspell(HighAlch: boolean): boolean;
    var
      HAlchDTM: integer;
    begin
    begin
      HAlchDTM := DTMFromString('78DA63B46662604860644006BFBEF18069982' +
           '8A31D504D04AA1A982C5C8D03116A9C816A5209A83102AA4922A0' +
           'C61EA82604BF1A004F1D05B8');
      findtabs;
      GameTab(7);
      wait(500);
      if HighAlch = True then
        begin
          if  FindDTM(HAlchDTM, x, y, 559, 336, 583, 360) then
              result := True;
         end else
            begin
              writeln('High Alch was not found, terminating');
              Result := False;
              Wait(10000);
              if  FindDTM(HAlchDTM, x, y, 559, 336, 583, 360)then
                begin
                  writeln('never mind, lucky bastard');
                  result := True;
              end else
                begin
                  writeln('yep, your screwed. terminating');
                  terminatescript;
                end;
            end;
        end;
    end else
        begin
          if (GetColor(713, 258) = 849658) and (GetColor(720, 254) = 3195184) then
            result := True;
          end else
            begin
              writeln('Low Alch was not found, terminating');
              Result := False;
              Wait(10000);
            end;
            if (GetColor(713, 258) = 849658) and (GetColor(720, 254) = 3195184) then
              begin
                writeln('Never Mind! Low Alch was found, going on');
                result := True;
            end else
                begin
                  writeln('Low Alch was not found, terminating');
                  Result := False;
                end;
        end;
    end;

    every thing should be self explanitory,

    error:

    Line 433: [Error] (16748:5): Semicolon (';') expected in script C:\Program Files\SCAR 3.20\Scripts\akward alcher v1.1.scar

    like the title says, errors hate me haha..
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  2. #2
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Which one is line 433?

  3. #3
    Join Date
    Sep 2008
    Location
    Adelaide, South Aust
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I found two too many end statements try this....
    SCAR Code:
    function findspell(HighAlch: boolean): boolean;
    var
      x, y, HAlchDTM: integer;
    begin
      HAlchDTM := DTMFromString('78DA63B46662604860644006BFBEF18069982' +
           '8A31D504D04AA1A982C5C8D03116A9C816A5209A83102AA4922A0' +
           'C61EA82604BF1A004F1D05B8');
      findtabs;
      GameTab(7);
      wait(500);
      if HighAlch = True then
      begin
          if  FindDTM(HAlchDTM, x, y, 559, 336, 583, 360) then
          begin
              result := True;
          end else
          begin
              writeln('High Alch was not found, terminating');
              Result := False;
              Wait(10000);
              if  FindDTM(HAlchDTM, x, y, 559, 336, 583, 360)then
              begin
                  writeln('never mind, lucky bastard');
                  result := True;
              end else
              begin
                  writeln('yep, your screwed. terminating');
                  terminatescript;
              end;
          end;
      end else
      begin
          if (GetColor(713, 258) = 849658) and (GetColor(720, 254) = 3195184) then
          begin
            result := True;
          end else
          begin
              writeln('Low Alch was not found, terminating');
              Result := False;
              Wait(10000);
          end;
          if (GetColor(713, 258) = 849658) and (GetColor(720, 254) = 3195184) then
              begin
                writeln('Never Mind! Low Alch was found, going on');
                result := True;
              end else
              begin
                  writeln('Low Alch was not found, terminating');
                  Result := False;
              end;
        end;
    end;
    Last edited by guyver; 04-02-2009 at 03:50 AM. Reason: whoops I made a mistake this is updated version

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you should use a case for this

    (won't fix error.. but makes it better IMO)

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    i should, but im too lazy to change it around right now, and im on my other cpu so i'll check the fixed one later
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •