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

it seems the AngelScript havent "include" keywords?

Started by
2 comments, last by Deyja 18 years, 10 months ago
Even as the post's title, If I wanna include some common files, how to do?
Advertisement
Since AngelScript doesn't load the files itself, it cannot support include directly. However, you easily write a simple preprocessor that scans for #include directives and if found adds a second script section with the included file.

When the preprocessor finds an #include it could easily remove it from the original script by substituting the first two characters for //, making the line a comment. That way AngelScript will still be able to compile the script without problems.

Read the following article for more info: Using #include with AngelScript

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

So easy and so fast reply:)
THX
It's even easier than that.

This topic is closed to new replies.

Advertisement