• Optimization
    1 replies, posted
Instead of creating several variables for a function that returns more than one object, how could i only get the object I want? Example: function Test() return "Hello", "World" --Return two objects end local one, two = Test() --Create two vars, whereas i only need one. local two = Test()[2] --Return "e", the second char of "Hello", as expected. If my question isn't clear enough, feel free to ask for more informations. Thanks!
Use select.
Sorry, you need to Log In to post a reply to this thread.