Results 1 to 3 of 3

Thread: GSC GetArrayKeys

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    HEY YOU'RE AWESOME

    Should work like this:
    PHP Code:
    arr = [];
    arr["a"] = 1;
    arr["b"] = "two";
    arr["c"] = 3.333;

    keys getArrayKeys(arr);
    // keys[0] will be "a"
    // keys[1] will be "b"
    // keys[2] will be "c" 
    It makes some scripting much easier, without some hackery to save the keys of an array in an extra array.
    timescale 0.01

  2. The Following 2 Users Say Thank You to kung foo man For This Useful Post:

    Mitch (27th April 2015),Ni3ls (27th April 2015)

Posting Permissions

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