UnrealScript `log and `warn errors
I’ve been playing with the SDK for a bit and following various tutorials. Unfortunately, I seem to encounter a strange error in my own scripts when I try to use the
log andWarn functions. They work fine in existing AOC code, but if I use them in a new class (while extending the same parent classes and all), they throw the following errors during build time:
Error, Can't access private function 'WarnInternal' in 'Object'
Error, Can't access private function 'LogInternal' in 'Object'
The specific example is if I try to create a new game type (I created a new classes based on the AOCFFA classes).
Anybody have an idea of what’s going on? Thanks in advance.
EDIT: I should note that currently I’m just commenting out those functions, and the code runs fine and behaves as it should. Still, I’d like to know what the problem is with those, if anybody can shed some light.
Log andWarn will never work. We compile the game’s scripts in final_release which disables these macros for performance reasons.
I’ve added a
LogAlways andWarnAlways macro for modders. Unfortunately, I made bit of a slip-up and they don’t point to the right functions…
Until that’s fixed, rather than using the macros you can use the LogAlwaysInternal and WarnAlwaysInternal functions (in Object.uc).
Thanks for the thorough and quick reply CrustaceanSoup! It’s very helpful, I’ll just leave them commented out for now.