PAWNO #defines limit? -
Tommy_Diaz - 20.05.2013
Hi all, I have strange problem:
I just adding some things to gamemode, and I make defines but dont make other code yet...
And, strangely, I cant compile the gamemode (end now error)! What the... I just add few defines!
I deleted defines, and compiler compile the gamemode without any problem.
Then I added few defines (whatever it is - define colors, define text or vehicle or whatever), again end now error.
Then I add define by define, and after two-three defines, compiler crashing again. It is like this:
this works and script compile
#define testblue {0000FF}
//#define testred {FF0000}
this works and script compile
//#define testblue {0000FF}
#define testred {FF0000}
this dont work and compiler crashing
#define testblue {0000FF}
#define testred {FF0000}
It is like that PAWNO have limit for defines (lets say 1024) and if I add 1025 define, it start to send dont send error...
Does anyone know whats wrong and why I cant add any more defines?
Re: PAWNO #defines limit? -
Stanford - 20.05.2013
Maybe you wrote the defines wrongly or something.. for example (not sure just helping):
and you wrote it like this:
I hope I helped!
Re: PAWNO #defines limit? -
Tommy_Diaz - 20.05.2013
Thanks, appreciate your help, but no matter what I type into define, pawncc.exe crashes. I just add defines, but dont use it anywhere in the script (yet)...
I used that define just for show here in forum... No matter if I use this:
#define test01 just test
#define test02 just test
or whatever... Compiler crashed. If i delete some other defines, my new defines works... Like that defines have a limit.
I have useless color-defines so I will delete and instead of COLOR_RED will use 0xFF0000AA but I want to know why I cant have so much defines, thats first time to heard about define limit :S
AW: PAWNO #defines limit? -
HurtLocker - 20.05.2013
Colors are defined like this: #define color_red "{FF0000}"
Re: PAWNO #defines limit? -
Tommy_Diaz - 20.05.2013
I just use that example for test... I cant even use that color_red {ff0000} in SCM. Just for example.
Whatever i typed in define, complired keep crashing after few defines... So must delete unused defines to make space for more defines. I never heard about that before, maybe this will help for other who doesnt know why compiler crashing, if its really something to limit it?
AW: PAWNO #defines limit? -
HurtLocker - 20.05.2013
for how many defined things are we talking about? Cause its really hard to reach the limit whatever it is.
Re: PAWNO #defines limit? -
CodyCummings - 20.05.2013
I'm not sure if it's the define but rather it might be the usage of the define perhaps? I've so far compiled 50k defines in one file, it took a while but was successful. Here's a snippet.
pawn Код:
...
#define TEST_39930 {000000}
#define TEST_39931 {000000}
#define TEST_39932 {000000}
#define TEST_39933 {000000}
#define TEST_39934 {000000}
#define TEST_39935 {000000}
#define TEST_39936 {000000}
#define TEST_39937 {000000}
#define TEST_39938 {000000}
#define TEST_39939 {000000}
#define TEST_39940 {000000}
#define TEST_39941 {000000}
#define TEST_39942 {000000}
#define TEST_39943 {000000}
#define TEST_39944 {000000}
#define TEST_39945 {000000}
#define TEST_39946 {000000}
#define TEST_39947 {000000}
#define TEST_39948 {000000}
#define TEST_39949 {000000}
#define TEST_39950 {000000}
#define TEST_39951 {000000}
#define TEST_39952 {000000}
#define TEST_39953 {000000}
#define TEST_39954 {000000}
#define TEST_39955 {000000}
#define TEST_39956 {000000}
#define TEST_39957 {000000}
#define TEST_39958 {000000}
#define TEST_39959 {000000}
#define TEST_39960 {000000}
...
i=0; while [ $i -lt 50000 ]; do echo "#define TEST_$i {000000}" >> defines.pwn; ((i += 1)); done
Not sure what's causing you grief here, unless you have over 50k defines for some reason...