Advertisement

Invalid property declaration error message

Started by September 08, 2015 08:56 AM
3 comments, last by WitchLord 9 years, 2 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?

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

Advertisement

"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