🎉 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

Started by
1 comment, last by Dentoid 17 years, 5 months ago
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
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.

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

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. :)

This topic is closed to new replies.

Advertisement