Skip to main content
gamedev.net
🔒 Locked

GetTypeIdByDecl error

Started by Dentoid 1 reply 1.4k views
Original Post
Dentoid
Dentoid
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
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel
Dentoid
Dentoid
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. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.