Results 1 to 4 of 4

Thread: hi, i dont usually code in scar but, how do arrays work in it?

  1. #1
    Join Date
    Dec 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default hi, i dont usually code in scar but, how do arrays work in it?

    all help would be appreciated thanks

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    http://villavu.com/forum/showthread.php?t=32182 (Specifically a TPA tutorial.)
    http://villavu.com/forum/showthread.php?t=28436 (This is probably what you want.)

  3. #3
    Join Date
    Feb 2008
    Location
    S
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You code in Pascal, not SCAR.

    SCAR Code:
    ArrayOfNumbers : Array of Integer;
    ArrayOfSentences : Array of String;
    AnotherArrayOfNumbers : Array[0..10] of Integer; //Makes an array that has values AnotherArrayOfNumbers[0] all the way up to AnotherArrayOfNumbers[10]

  4. #4
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by trecool999 View Post
    You code in Pascal, not SCAR.

    SCAR Code:
    ArrayOfNumbers : Array of Integer;
    ArrayOfSentences : Array of String;
    AnotherArrayOfNumbers : Array[0..10] of Integer; //Makes an array that has values AnotherArrayOfNumbers[0] all the way up to AnotherArrayOfNumbers[10]
    ArrayOfNumbers := [1, 25, 3, 6, 2 ,36];
    ArrayOfSentences := ['string1', 'string2', 'string3'];
    AnotherArrayOfNumbers := [2, 6, 23, 36, 43, 2, 24, 34, 15, 26, 11];

    Then you call them like:

    ArrayOfNumbers[2]; //will be 3
    ArrayOfSentences := [2]; //Will be 'string3'
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

Thread Information

Users Browsing this Thread

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

Posting Permissions

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