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

#include in scriptbuilder addon may report wrong path on error

Started by
2 comments, last by gjl 9 years, 9 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?

Advertisement
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

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