Results 1 to 5 of 5

Thread: Weird comma-expected thing.

  1. #1
    Join Date
    Mar 2008
    Location
    The Netherlands
    Posts
    1,395
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default Weird comma-expected thing.

    Well, I have a script with 14 bitmaps of questions and answers on them, all declared in an array:
    SCAR Code:
    var
      Q : Array [1..14] of Integer;
      A : Array [1..14] of String;
      C : Integer;
    After that I declare the bitmaps.

    My procedure to find the Q and the appropiate A is as follows:
    SCAR Code:
    procedure FindQA;
    var
      I,X,Y : Integer;
      Ans : String;
      W : Integer;
    begin
      for i:=1 to 14 do
        begin
          if FindBitmap(Q[i],x,y] then
            begin
              W:= i;
              break;
            end;
        end;
      Ans := A[i];
      Sendkeys(Ans+chr(13));
    end;
    .

    Scar says:
    Line 240: [Error] (240:23): comma (',') expected in script C:\Program Files\SCAR 3.15\Scripts\QABot.scar

    What do I do wrong?

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

    Default

    Which line is 240?

  3. #3
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You're missing a close bracket?:

    SCAR Code:
    if FindBitmap(Q[i],x,y] then

  4. #4
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not exactly missing one, but instead of ')' is ']'
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  5. #5
    Join Date
    Mar 2008
    Location
    The Netherlands
    Posts
    1,395
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Lubya Zeph. Rep++

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
  •