02.03.2017, 01:57
(
Последний раз редактировалось MP2; 02.03.2017 в 02:35.
)
I'm having some really frustrating issue with the compiler crashing on me.
It is (indirectly) caused by adding a simple color #define. And it has something to do with how many functions/defines I have in my script. Am I wrong to think that PAWN doesn't have a limit on how many functions/defines you can declare?
Anyway, everything works, but then if I add '#define COLOR_PURPLE 0xFFwhatever' to the top of my script, the compiler crashes. But then, If I remove an EMPTY function (no code inside it) from the bottom of my script, it works. It seems the compiler will only let me have one or the other.
Another thing I did to fix it was move an enum declaration to the top of my script. It then moved it down bit by bit until the compiler crashed, and it seemed to be caused by another enum. I thought I had found the problem, but upon commenting out the other enum and putting mine back to where it was, I re-added the blank function at the bottom of my script (wasn't blank, but I commented everything out to check) the compiler started crashing again..
I am extensively using YSI and y_hooks, and this this may be the cause.
Any ideas? I am literally about to give up because this is so random and unfixable.
EDIT: Okay I have done some playing around and discovered something that makes no sense.
It seems that the value of my COLOR_PURPLE define is causing the compiler crash if it's too high?! Look below
EDIT: Okay, narrowed it down a bit more..
So it must be to do with the length of the value (seeing as defines are just text-based replacement and have no concept of value). How can this even be a problem?! I have other color defines throughout my script which have no problem, but it seems I cannot add any more?
It is (indirectly) caused by adding a simple color #define. And it has something to do with how many functions/defines I have in my script. Am I wrong to think that PAWN doesn't have a limit on how many functions/defines you can declare?
Anyway, everything works, but then if I add '#define COLOR_PURPLE 0xFFwhatever' to the top of my script, the compiler crashes. But then, If I remove an EMPTY function (no code inside it) from the bottom of my script, it works. It seems the compiler will only let me have one or the other.
Another thing I did to fix it was move an enum declaration to the top of my script. It then moved it down bit by bit until the compiler crashed, and it seemed to be caused by another enum. I thought I had found the problem, but upon commenting out the other enum and putting mine back to where it was, I re-added the blank function at the bottom of my script (wasn't blank, but I commented everything out to check) the compiler started crashing again..
I am extensively using YSI and y_hooks, and this this may be the cause.
Any ideas? I am literally about to give up because this is so random and unfixable.
EDIT: Okay I have done some playing around and discovered something that makes no sense.
It seems that the value of my COLOR_PURPLE define is causing the compiler crash if it's too high?! Look below
EDIT: Okay, narrowed it down a bit more..
So it must be to do with the length of the value (seeing as defines are just text-based replacement and have no concept of value). How can this even be a problem?! I have other color defines throughout my script which have no problem, but it seems I cannot add any more?