letting the script know a constant value in a #define macro
Hi,
I simply want to let the script know some constant values defined in macros (y'know, #define BLAH 5). I don't see it in the manual and I fail at doing it using RegisterGlobalProperty. Any hint for this? I can always change the way they are defined in the code, but I thought I could ask first.
Thnx in advance.
A #define macro is replaced with the value it's define to everywhere it's used at preprocessor time. This means it doesn't really exist anywhere in memory, so AngelScript doesn't have anything to bind to. To be able to bind it as a global, you need it to be in a variable (like "static const int blah = 5" or so).
Hope that helps :)
Hope that helps :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement