Posts: 662
Threads: 102
Joined: Sep 2010
Reputation:
0
I've ran into an issue while scripting my gamemode where I cannot #include any more scripts. I was wondering if there was any limit to how many I can #include before it breaks and if there is any way to fix this? I was using #include to separate different parts of the script.
I currently have used #include 58 times in my script and using any more seems to have no effect.
Posts: 720
Threads: 34
Joined: Dec 2010
Reputation:
0
I haven't ran into this issue, I have over 200 #include and it seems to work perfectly. Maybe one of your includes has a problem, try adding include per include until you find the one causing the problem.
Posts: 331
Threads: 1
Joined: Mar 2016
Reputation:
0
My gamemode has so many includes that I can't count right now.
Check your include guards, see if they're stopping the inclusions. If your path has more than 31 chars you'll need to use Zeex's compiler to bypass the limit.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Make sure that your include paths use backslashes, not forward slashes. Forward slashes may work up to a total path length of 30-ish characters but beyond that you will start to experience glitchy behavior.
Posts: 662
Threads: 102
Joined: Sep 2010
Reputation:
0
01.04.2017, 09:30
(
Последний раз редактировалось [WSF]ThA_Devil; 01.04.2017 в 12:36.
)
Thanks for the answers everyone! I managed to get it working by using Zeex's patched compiler.
Also, I changed all my slashes, as Vince stated, just in case if that casuses any problems in the future.