Results 1 to 12 of 12

Thread: ahhhh....type mismatch

  1. #1
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ahhhh....type mismatch

    I know what it means when it says type mismatch error, but i checked all my types and they seem alright.....could someone tell me why the code doesnt work:
    SCAR Code:
    const
    howmany=10; //how many of the item you want.
    whatyouwannabuy='lobs'; //what IS the item you want?
    eaprice=200; //Just wondering, how much would you want to buy each?
    Var
    Message1:String;

    procedure Buyingstatement; //This starts talking using your buying statement.
    begin
    wait(1000); //Waits a few seconds before typing again.
    Message1:=(Message1='buying up to'+ ''+  (howmany)+ '' + (whatyouwannabuy) +'! for' + eaprice + '!');
    typesend(Message1);

  2. #2
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    cmon.....i want to fix this but ive tried EVERYTHING
    is it really that hard to fix?

  3. #3
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wy teh fck is this taking so long....

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

    Default

    wrap the numbers in inttostr()

    Integer To String

  5. #5
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thx for answring ^^

    but now i get a type mismatch at the end of the line, here is my code:
    SCAR Code:
    Message1:=(Message1='buying up to'+ ''+inttostr(howmany)+inttostr(whatyouwannabuy)+'! for' + inttostr(eaprice) + '!');   //this SHOULD make the typing message work....
    typesend(Message1);


    if i remove the ';' at the end of the first line, it says that typesend(Message1) has an type mismatch error....

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

    Default

    whatyouwanabuy is already a string, because it is 'pink'

  7. #7
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i erased the inttostr for that and it still doesnt work....it says theres a type mismatch at the end of the line, at the ';' part....

  8. #8
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ...*bump*

  9. #9
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no matter what i do it keeps coming up with this >.<

    can someone else compile it and see if it works with them?

  10. #10
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {.include SRL\SRL.scar}

    const
      howmany = 10; //how many of the item you want.
      whatyouwannabuy = 'lobs'; //what IS the item you want?
      eaprice = 200; //Just wondering, how much would you want to buy each?

    Var
      Message1: string;

    procedure BuyingStatement; //This starts talking using your buying statement.
    begin
      Wait(1000); //Waits a few seconds before typing again.
      Message1:= 'buying up to '+ IntToStr(howmany) + ' ' + whatyouwannabuy +'! for ' +  IntToStr(eaprice) + 'ea!';
      TypeSend(Message1);
    end;

    begin
      BuyingStatement;
    end.

  11. #11
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    omg thanks a million dude!

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

    Default

    Lol I completely missed Message1:=(Message1=

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 batnas in forum OSR Help
    Replies: 3
    Last Post: 04-24-2008, 06:48 PM
  2. Type Mismatch
    By pieman24 in forum OSR Help
    Replies: 2
    Last Post: 03-05-2008, 08:43 PM
  3. Type Mismatch
    By Runescapian321 in forum OSR Help
    Replies: 29
    Last Post: 12-28-2007, 07:42 PM
  4. type mismatch
    By Maxcore in forum OSR Help
    Replies: 12
    Last Post: 11-10-2007, 12:54 AM

Posting Permissions

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