You are currently viewing the gmlscripts.pro static mirror. Forum access and script submissions are not available through this mirror.

Invert gmlscripts.pro

array_add

Returns the given array with elements appended to it. If an array is not given, the given value is returned.

names[0] = "Charlie";
names[1] = "Juliett";
names[2] = "Mike";

names = array_add(names, "Oscar", "Romeo", "Victor");

//  names[0] == "Charlie"
//  names[1] == "Juliett"
//  names[2] == "Mike"
//  names[3] == "Oscar"
//  names[4] == "Romeo"
//  names[5] == "Victor"
array_add(array,value,...)
Returns the given array with elements appended to it.
COPY/// array_add(array,value,...)
//
//  Returns the given array with elements appended to it.
//  If an array is not given, the given value is returned.
//
/// gmlscripts.pro/license
{
    var r = argument[0];
    var o = array_length_1d(r) - 1;
    var i = argument_count;
    while (--i > 0) r[@o + i] = argument[i];
    return r;
}

Contributors: YellowAfterlife

GitHub: View · Commits · Blame · Raw