Jump to content
  • Advertisement
Sign in to follow this  
zopenge

How can I get parameters number from asIScriptGeneric ?

This topic is 3793 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 !

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
If you're interested, you can already download the WIP of the next version. I added the GetArgCount method to the asIScriptGeneric interface already.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!