Jump to content
  • Advertisement
Sign in to follow this  
Dentoid

GetTypeIdByDecl error

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

Hi I have a system where I in certain situations look for classes in a script. To do this I use GetTypeIdByDecl to get a type id from a name, and see if that is a class. My problem is that if there is a function in the script which happens to have the name I'm looking for instead of the class, I will get a runtime AS error saying "Identifier 'something' is not a data type". I can see why this happens, but is there some way of doing what I'm doing without triggering this error? Like getting a list of all types and scanning it myself or something? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
You could temporarily remove the message callback. The return value should be negative, meaning that the type is not existing, and you don't get any output to your message stream.

I'll try to think of a simpler solution in a future version.

Share this post


Link to post
Share on other sites
Ah, I'll just do some workaround or make sure the script doesn't look that way for now then. Or just live with the message. :)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!