Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Variadic arguments support

$
0
0
Hey! The variadic arguments are supported in angelscript? Im looking for something like this: void CAngelScript::printf(string format, ...) { const char * c_format = format.c_str(); va_list ap; va_start(ap, c_format); vprintf(c_format, ap); va_end(ap); return; } //later r = this->engine->RegisterGlobalFunction("void printf(string , ...)", asMETHOD(CAngelScript, printf), asCALL_THISCALL_ASGLOBAL, this); assert(r >= 0); And the script: void OnScriptInit() { printf("%s-%d", "test", 1); return; }

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>