Results 1 to 6 of 6

Thread: Help with adding variables to a string

  1. #1
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default Help with adding variables to a string

    SCAR Code:
    Complete:= ChatFX + 'Selling' + NumItems + '' + ItemName + 'for only' + Numitems * ItemPrice;


    What I want to know.

    Would that work? Or, more in depth, how do I add a variable to a string, and how do I multiply two variables (Integers)?

    Also, how to I print text to runescape?

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

    Default

    inttostr (Integer To String) around all the numbers, and the math

    Complete:= ChatFX + 'Selling ' + inttostr(NumItems) + ' ' + ItemName + ' for only ' + inttostr(Numitems * ItemPrice);

    Typesend(Complete);

  3. #3
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Thanks... But whats the difference between typesend and SendKeys?

    Does typesend press enter or something?

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

    Default

    Yes plus it's human-like.

  5. #5
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Also, while you won't use it much, BoolToStr will convert a boolean variable to a string
    Interested in C# and Electrical Engineering? This might interest you.

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

    Default

    FloatToStr Extended to String
    Int64ToStr 64bit integer to string

    Type strt and press ctrl+space in SCAR

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 03-30-2008, 01:40 PM
  2. Forms-adding variables from to script?Help
    By wtf i sp4nk in forum OSR Help
    Replies: 2
    Last Post: 01-27-2007, 03:20 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
  •