Results 1 to 3 of 3

Thread: Characters!

  1. #1
    Join Date
    Jun 2006
    Location
    Scotland
    Posts
    54
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Characters!

    Hi!

    Ok so this is what i need to do in scar.

    I have a word "test"

    and the following code:

    textlen:=Length(text) ;

    writeln ('The wordlength is : '+IntToStr(textlen));

    This prints out "The wordlength is 4". Perfect - that works.

    What i want to do now however - is to find out what say - the 3rd letter in the word is. and then print that out. I cannot see for the life of me which function i need to use.

    Please help!

    Thanks

    Andy
    http://www.funkhub.com Funkhub - my own site! - Join it!

    http://www.pens2paper.com Pens2Paper - The best online stationery shop!

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    function copy(s: string; ifrom, icount: Longint): string; - returns part of the string (Copy('abcde',2,3) would return 'bcd'.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  3. #3
    Join Date
    Jun 2006
    Location
    Scotland
    Posts
    54
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok - what an odd way to do it :S! Why no proper string functions in Scar?!

    Thanks for the help - i got it sorted now.
    http://www.funkhub.com Funkhub - my own site! - Join it!

    http://www.pens2paper.com Pens2Paper - The best online stationery shop!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 1 sec Ago Bug i see a characters(very BIG)
    By ShowerThoughts in forum SRL Site Discussion
    Replies: 5
    Last Post: 03-03-2008, 05:43 PM
  2. special characters
    By Pietpatat in forum OSR Help
    Replies: 2
    Last Post: 12-06-2007, 08:43 AM
  3. Duplicate characters
    By jdumber2k in forum Bot Information and Spottings
    Replies: 17
    Last Post: 09-28-2007, 03:53 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
  •