Results 1 to 9 of 9

Thread: Type mismatch error...

  1. #1
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default Type mismatch error...

    ok here is the main loop on my latest script:


    SCAR Code:
    begin
      SafeInitForm;
      SafeShowFormModal;
       if(RadioButton1.Checked)then
        begin
         Findnewmsg;
         SetTimeout(strtoint(stop), zxqwas));
         end;
       if(RadioButton2.Checked)then
        begin
         repeat
          Findnewmsg;
         until(False);
         end;
     end.



    and for the SetTimeout i get a type mismatch error for the zxqwas procedure....what do you thing could be causeing it? the zxqwas is just:



    SCAR Code:
    procedure zxqwas;
     begin
      TerminateScript;
      end;
    STOP PM'ING ME

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    You sure it's not the strtoint?

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Helps more if you post entire script.
    If you dont want to.
    Just PM it to someone you trust to fix it
    (me)

  4. #4
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Replace that old one, with this:
    SCAR Code:
    SetTimeout(StrToInt(stop), 'zxqwas');
    Your procedure name needed to be a string.
    Or you can also do:
    SCAR Code:
    SetTimeout(StrToInt(stop), 'TerminateScript');
    To make it shorter.

  5. #5
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    You sure it's not the strtoint?

    yes because its im trying to get it to stop after a set time...and i need the str to in cause they type in the time into a form and the edit returns it as str....

    junior i tried it as string and tons of diff things still dont work..and i tried instead of it calling up the procedure ..i did ur suggestiong jsut to put terminate script...but im getting identifier expected in script for the SetTimeOut line
    STOP PM'ING ME

  6. #6
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you mind posting the lines or the procedure where the settimeout procedure is?

  7. #7
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    i did first post
    STOP PM'ING ME

  8. #8
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm getting this same Mismatch Error...

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    ////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////AGENT 83's Rimmington Miner//////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////Credit to Ranger135xp, I used his///////////////////
    ////////////////////////////Varrock West Miner for a lot of/////////////////////
    ////////////////////////////Reference.//////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    procedure Bank2Mine;
    var GuildLadder: String;
    var acc: extended;
    begin
    if FindDeformedBitmapToleranceIn(GuildLadder,x,y,0,0,1000,800,50,50,true,acc) then
    begin
    MoveMouse(x,y)
    Wait(200)
    GetMousePos(x,y)
    ClickMouse(x,y,true)
    end;
    end.
    Procedure BitMapData;
    Begin
           GuildLadder := BitmapFromString(19, 31, 'z78DAED96CB1283200' +
           'C457F292418702908FFFF49C5329D32521D2C8F2E2A8BB3D1C9F1' +
           '465EDA68CD9E0D2FA8CAE9A4976E3564C4A2AE32ADE33D31B1776' +
           '0C1C69A291B1AF9ED4240F01618D8CD1046FA66FE0DE5FC607CE6' +
           '8A2E2F3697757B630D77BD0AC6AD3A8835E6B2F01AA29531CF18E' +
           'DD1D2CF951BFB59F20E8F71FD8F31FC474055B28EDA1A73DEC65F' +
           '192785D3F59DB0DE78CE1263793FCF33F6368ECC7854F9CED86AE' +
           '6F4CEF8DD4C1EB9DB9CDFD0469E5F37EBB9DDC2851B6F8C94820C' +
           'C923D6BBC8D1840A11453026244D88734E89B4A03F7A5ACE079F3' +
           '61EF2');

        end.
    begin
    SetupSRL
    BitMapData
    Bank2Mine
    end

    No matter what I tell it to do after the FindBMP, it gives me that Type mismatch error.

  9. #9
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    first off...please make you OWN thread for YOUR issues....and second you forgot a whole bunch of semi-colins ..and the period goes after main loop not before ...try this
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    ////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////AGENT 83's Rimmington Miner//////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////Credit to Ranger135xp, I used his///////////////////
    ////////////////////////////Varrock West Miner for a lot of/////////////////////
    ////////////////////////////Reference.//////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    procedure Bank2Mine;
     var GuildLadder: String;
     var acc: extended;
      begin
       if FindDeformedBitmapToleranceIn(GuildLadder,x,y,0,0,1000,800,50,50,true,acc) then
        begin
         MoveMouse(x,y);
          Wait(200);
         GetMousePos(x,y);
         ClickMouse(x,y,true);
         end;
      end;
     
    procedure BitMapData;
     begin
           GuildLadder := BitmapFromString(19, 31, 'z78DAED96CB1283200' +
           'C457F292418702908FFFF49C5329D32521D2C8F2E2A8BB3D1C9F1' +
           '465EDA68CD9E0D2FA8CAE9A4976E3564C4A2AE32ADE33D31B1776' +
           '0C1C69A291B1AF9ED4240F01618D8CD1046FA66FE0DE5FC607CE6' +
           '8A2E2F3697757B630D77BD0AC6AD3A8835E6B2F01AA29531CF18E' +
           'DD1D2CF951BFB59F20E8F71FD8F31FC474055B28EDA1A73DEC65F' +
           '192785D3F59DB0DE78CE1263793FCF33F6368ECC7854F9CED86AE' +
           '6F4CEF8DD4C1EB9DB9CDFD0469E5F37EBB9DDC2851B6F8C94820C' +
           'C923D6BBC8D1840A11453026244D88734E89B4A03F7A5ACE079F3' +
           '61EF2');
        end;
       
    begin
     SetupSRL;
     BitMapData;
     Bank2Mine;
     end.

    Back onto my issue: i got rid of the missmatch error...i accidently left extra bracket when i took away repeat and until....then i found another issue so i fixed that but now i got yet another problem...this is the procedure for the form result
    SCAR Code:
    procedure buttonclick(sender: TObject);
     begin
      ClearDebug;
      Writeln('Set-up Completed');
      Writeln('Running Auto-replier');
      frmDesign.Caption:= frmDesign.Caption + '.';
      frmDesign.ModalResult:= mrOk;
      speak:= True;
      Edit1.Text:= s;
      Edit2.Text:= msg1;
      Edit3.Text:= msg2;
      Edit4.Text:= msg3;
      If(RadioButton1.Checked)then
       begin
        SetTimeOut(strtoint(s), 'TerminateScript');
        end;
      end;

    now edit1 is the box you set the time for....but when i pres play...the form pops up then i fill it out and press ok..then another box pops up saying " '' is not a valid integer value" so what would be wrong? i have strtoint for to convert the edits from string to integers in my other scripts and i didnt get this error
    STOP PM'ING ME

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Type Mismatch Error, Help!
    By Ultra in forum OSR Help
    Replies: 4
    Last Post: 01-21-2009, 10:24 PM
  2. ERROR type mismatch
    By shaman in forum OSR Help
    Replies: 5
    Last Post: 12-17-2008, 01:02 AM
  3. Type Mismatch Error?
    By crossback7 in forum OSR Help
    Replies: 2
    Last Post: 06-23-2007, 05:28 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
  •