Advertisement

How can I get parameters number from asIScriptGeneric ?

Started by March 03, 2008 01:54 AM
3 comments, last by zopenge 16 years, 8 months ago
AS Code : void Test( uint x1, uint x2, uint x3, uint x4 ) { // Do something } C++ Code : void Test( asIScriptGeneric* gen ) { // How can I get parameters number from asIScriptGeneric ? // Because I want to do something different what base on parameters number // Just like wsprintf( ) function. switch ( /* gen the par number */ ) { // Do something ... } } Thanks so much !
There's currently no easy way of doing that. I'll add a method GetArgCount to the asIScriptGeneric interface so you can do what you want.

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
Thanks so much, I really expect for the next version :)
If you're interested, you can already download the WIP of the next version. I added the GetArgCount method to the asIScriptGeneric interface already.

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

Thanks, I will ~~:)

This topic is closed to new replies.

Advertisement