Advertisement

#include in scriptbuilder addon may report wrong path on error

Started by September 17, 2014 07:43 AM
2 comments, last by gjl 10 years, 2 months ago

Hi,

I have noticed a minor issue with the scriptbuilder add-on when using include directives: if included files are missing, the reported path in the error message is a concatenation of the "current path" and the full path of the included file, which is awkward in most cases (like C:\MyDirectory\C:\MyOtherDirectory\missing_file.as" on Windows).

This is due to the fact that relative and absolute paths may be mixed when loading files. So I propose the simple modification in the attached patch. It's not perfect because it will report relative paths instead of full path when using LoadSectionFromFile with a path relative to the current path, but it avoids that wrong paths are reported in most other cases, so it seems a bit better than the current implementation until proper absolute/relative path management can be implemented.

What do you think?

Thanks. I'll verify the problem and the patch.

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

I've improved the code in revision 2011 to build the correct path when reporting errors

Thanks,

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

Thanks, you rock! :-)

This topic is closed to new replies.

Advertisement