samspade
Member
While you don't need to use the argument array if you want to pass in less than the max amount of arguments, as GM will provide undefined for those, I can't see away to get around it for an issue like this where you want to pass in an unspecified number of arguments (short of turning those arguments into your own array and passing them in as one argument).
Am I missing a way to do it, or is the augment array still necessary in this case?
GML:
function array_add_to_end() {
var _array = argument[0];
for (var i = 1; i < argument_count; i += 1) {
_array[@ array_length(_array)] = argument[i];
}
return _array;
}