Advertisement

Functions with default parameters

Started by February 19, 2013 11:42 PM
1 comment, last by pbody2012 11 years, 9 months ago

It is possible to register functions with defaults arguments and call them from the script.

Yes, but you need to inform the default parameter value in the registration.

// C++
void func( int a, int b = 1 ) {}
 
// Registration with AngelScript
engine->RegisterGlobalFunction("void func(int, int b = 1)", asFUNCTION(func), asCALL_CDECL);

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

Advertisement

thnx

This topic is closed to new replies.

Advertisement