T
tomsaram
Guest
Hi,
I am having this error that I cannot make sense of:
I somehow narrowed the error to this line:
Or more specifically, the use of macro DTBS_OTHER_NUM. The macro is defined as follows:
The weird thing is that DTBS_ENEMY_NUM and DTBS_BOSS_NUM are completely fine, although they are defined in the exact same way as DTBS_OTHER_NUM. Something seems to be special with DTBS_OTHER_NUM, and I don't know what.
The following things seems to fix the error:
1. Avoid using DTBS_OTHER_NUM at all.
2. Define DTBS_OTHER_NUM as the literal 28.
3. Define DTBS_OTHER_NUM as the expression (DTBS_BOSS_NUM+25). (I found this curious one by mistake)
Does anyone have a clue on why this is? I know I can fix this simply by defining my macros as literals, but I am really curious.
Thanks.
P.S. Now that we are on the topic of macros, Is there a way to define a macro as an array? This is kind of what I wanted to do with global.DTBS_NUMBER.
Edit: jo-thijs pointed out that the expressions need brackets. I added the brackets but it seems to be irrelevant to the compiler error.
I am having this error that I cannot make sense of:
Final Compile...Error : gml_Script_GameInitialize(0) : Fatal Error while compiling - bailing details below
System.NullReferenceException: Object reference not set to an instance of an object.
at ...ctor( _value)
at ...ctor( _tok)
at ..( )
at ..( )
at ..( )
at ..( )
at GMAssetCompiler.GML2VM.( , )
(And there are weird boxes in those brackets, like when you try to play a Japanese game on a machine that does not have the language installed)
System.NullReferenceException: Object reference not set to an instance of an object.
at ...ctor( _value)
at ...ctor( _tok)
at ..( )
at ..( )
at ..( )
at ..( )
at GMAssetCompiler.GML2VM.( , )
(And there are weird boxes in those brackets, like when you try to play a Japanese game on a machine that does not have the language installed)
I somehow narrowed the error to this line:
Code:
global.DTBS_NUMBER[3] = DTBS_OTHER_NUM - DTBS_ENEMY_NUM;
Code:
...
DTBS_OTHER_NUM | (DTBS_ENEMY_NUM+20)
DTBS_ENEMY_NUM | (DTBS_BOSS_NUM+5)
DTBS_BOSS_NUM | (DTBS_EVENT_NUM+1)
DTBS_EVENT_NUM | 2
....
The following things seems to fix the error:
1. Avoid using DTBS_OTHER_NUM at all.
2. Define DTBS_OTHER_NUM as the literal 28.
3. Define DTBS_OTHER_NUM as the expression (DTBS_BOSS_NUM+25). (I found this curious one by mistake)
Does anyone have a clue on why this is? I know I can fix this simply by defining my macros as literals, but I am really curious.
Thanks.
P.S. Now that we are on the topic of macros, Is there a way to define a macro as an array? This is kind of what I wanted to do with global.DTBS_NUMBER.
Edit: jo-thijs pointed out that the expressions need brackets. I added the brackets but it seems to be irrelevant to the compiler error.
Last edited by a moderator: