🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
GetTypeIdByDecl error
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
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.
I'll try to think of a simpler solution in a future version.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement