🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Variadic arguments

Started by
2 comments, last by WitchLord 4 years, 2 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.

Advertisement

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

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