Results 1 to 5 of 5

Thread: Type Mismatch? What is this?

  1. #1
    Join Date
    Jul 2008
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Type Mismatch? What is this?

    I'm getting a Type Mismatch error and I don't even know what that means.

    Code:
    program ArchlordAutoHunterv1;
    var
    SystemTime, H, M, S, perk, perkpost, buff1, buff1post, buff2, buff2post, monsters : integer;
    
    procedure SystemInformation;
    begin
         SystemTime := GetSystemTime;
         SystemTime := ConvertTime(SystemTime, H, M, S);
         writeln('////////////////////////////////////////////////////////////////');
         writeln('-System Information');
         writeln('The macro begins at ' + IntToStr(H) + ':' + IntToStr(M) + '.');
         writeln('////////////////////////////////////////////////////////////////');
    end;
    
    procedure DefineColors;
    begin
    .................
    ............
    ......
    ...
    .
    Failed when compiling
    Line 8: [Error] (8:47): Type mismatch in script C:\Program Files\SCAR 3.15\Scripts\ArchlordAutoHunter_v1.scar
    Also, while I'm here (and it's the least of my troubles, I was just wondering), is there any way to tell if it's AM or PM when getting the system time?

    But I really just want to figure the type mismatch thing out first

    Edit: Just so you don't have to count all the way over. When it takes me to the error spot here is where I end up-

    Code:
    SystemTime := ConvertTime(SystemTime, H, M, S);
    Between the 'M' and ','

  2. #2
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    type mismatch error is when you for exemple try writeLn() an integer;

    a:integer
    writeLn(a);
    you must convert integer to string so : WriteLn(inttostr(a));
    :P

  3. #3
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    1,124
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Don't give SystemTime the value of converttime.

  4. #4
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure SystemInformation;
    begin
         SystemTime := GetSystemTime;
         ConvertTime(SystemTime, H, M, S);
         writeln('////////////////////////////////////////////////////////////////');
         writeln('-System Information');
         writeln('The macro begins at ' + IntToStr(H) + ':' + IntToStr(M) + '.');
         writeln('////////////////////////////////////////////////////////////////');
    end;
    :P

  5. #5
    Join Date
    Jul 2008
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys, it worked!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Type Mismatch...
    By Raskolnikov in forum OSR Help
    Replies: 3
    Last Post: 10-18-2008, 05:56 AM
  2. Type mismatch
    By batnas in forum OSR Help
    Replies: 3
    Last Post: 04-24-2008, 06:48 PM
  3. Type Mismatch..
    By Nava2 in forum OSR Help
    Replies: 1
    Last Post: 04-23-2008, 07:44 PM
  4. Type mismatch Help
    By Ashur2Good in forum OSR Help
    Replies: 2
    Last Post: 05-23-2007, 03:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •