Advertisement

Variadic arguments

Started by March 27, 2020 03:02 PM
2 comments, last by WitchLord 4 years, 7 months ago

Hey folks, nice community you got here. But let me get straight to the point.
Im completely new to AngelScript and to be honest i didnt even include it in the project the right way at the moment. I need simple function Log(string, …)
Now i have trouble implementing function in AS with variadic arguments. Any examples are welcome.

I don't think there is support for variadic arguments, but the c++ side can register wildcard arguments for functions, so you can implement something similar

Advertisement

Welcome to the community ?

MrFloat is correct. variadic arguments are not yet supported.

You can use variable argument types combined with default arguments to get something similar, or you can write the function to receive a dictionary with the variable arguments.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement