Skip to content

Varargs

Christian Petersen edited this page Feb 10, 2017 · 2 revisions

Some functions and methods in Angelscript support the use of variable arguments. This allows you to pass a variable number of arguments to the function or method.

Using varargs

Using varargs is mostly the same as using regular arguments, but there are some things to be aware of.

When you pass reference types to varargs functions, make sure to convert it into a handle using @obj. Otherwise Angelscript will attempt to copy construct it.

Maximum number of arguments

The maximum number of arguments is currently 8.

Clone this wiki locally