• Advertisement
Sign in to follow this  

How to get Class Variables in script.

This topic is 2768 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

The GetTypeIdByDecl only returns class which i register. This is what i am trying to do. I Have an SpriteInterface class which i register with the scripting system.
Then in script i do that.

class Mouse:SpriteInterface
{
};
//Now in C++ what i want to do is create an Instance of the Mouse Object. But when i try to query for the Mouse class i keep getting an negative value for the functionid.

Share this post


Link to post
Share on other sites
Advertisement
Just in case anyone else may have the same doubt.

It is necessary to use the GetTypeIdByDecl on the asIScriptModule interface to get the type id's of script classes from the name.

This is because the same class name can be used in multiple modules, each with their own type id.

Share this post


Link to post
Share on other sites
Quote:
Original post by BornToCode
Forget it. I solved it.

It doesn't help anyone if you don't leave a note just how you solved it.
It might prove helpful for others in the same situation.

Share this post


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

  • Advertisement