🎉 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!

Invalid property declaration error message

Started by
3 comments, last by WitchLord 8 years, 9 months ago

When declaring a property, Angelscript will return error code -10, asINVALID_DECLARATION, if a property name uses a reserved name, for instance "in". The error message doesn't really make this clear:


Error: Property(1, 9): Expected identifier
Error: Property(1, 9): Instead found 'in'
Error: (0, 0): Failed in call to function 'RegisterGlobalProperty' with 'IStream
 in' (Code: -10)

Would it be possible to make the parser inform the type of declaration error?

Advertisement

What do you suggest as a better error message in this case?

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

"Identifier 'in' is a reserved keyword" sounds like a good message.

I agree.

I've added this to my to-do list.

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

I've made this change in revision 2222.

Regards,

Andreas

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

This topic is closed to new replies.

Advertisement