Results 1 to 5 of 5

Thread: Type mismatch

  1. #1
    Join Date
    Aug 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Unhappy Type mismatch

    Here's the error message i keep getting, and also the accompanying lines of script. (the first line of code is line 585)


    Line 585: [Error] (31528:45): Type mismatch in script C:\Documents and Settings\owner\Desktop\Crafting Guild Miner 0.14 (R).scar

    Code:
    if not CountItems(GoldOre, 'bmp', [10]) > 0 then
      begin
        SaveScreenshot(ScriptPath + 'Calibrate - Moving to door ' + TimeRunning + '.bmp')
        if not FindAndSolveDoor then
        begin
          repeat
            if not LoggedIn then Exit;
            Writeln('Opening the door failed, maybe we clicked the wrong one');
            Logout;
            Wait(5000 + Random(5000));
            LoginPlayer;
            GoToDoors;
            //WalkOneTile(2933, 3289, 2, 0);
            if FindAndSolveDoor then Break;
            Inc(NoDoors);
          until NoDoors > 2;
          if NoDoors > 2 then
          begin
            LogoutPlayer('Calibrate - No opening doors');
            Exit;
          end;
        end;
      end;

  2. #2
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Swap GoldOre with 'bmp' in the first line.
    So:
    SCAR Code:
    if not CountItems('bmp', GoldOre, [10]) > 0 then

  3. #3
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    by the way, type mismatch just means you were meant to put in one type of variable and put in another. Most the time when I make that mistake it'd be for something like forgetting to do IntToStr();. Just check what variables were supposed to be put in and what you actually put in.

  4. #4
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's most likely not his script. So not even the best section for this.
    That function was updated in the last srl revision http://www.villavu.com/forum/showthread.php?t=47381 (or earlier) and the script became outdated because of it.
    Sorry if this is your script and I am wrong. But if I am right next time post on the script's thread.

  5. #5
    Join Date
    Aug 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah ok, sorry, it's just a wanted a quick answer and the thread is almost dead.

    cheers,
    Last edited by comando346; 08-24-2009 at 02:19 PM.

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
  •