Posts: 1,547
Threads: 122
Joined: Jun 2014
Reputation:
0
uses of many includes? mess up the script? i once used many includes and i got crap load of errors for nothing :/ is there a limit for maximum includes?
Posts: 80
Threads: 9
Joined: Jun 2015
Reputation:
0
Really Nigga xD ?
EDIT: I dont think so as you can put infinite Includes
Posts: 177
Threads: 22
Joined: Jun 2015
Reputation:
0
Nah maybe you miss the Files yesterday i got the same problem
1- open your server Folder, go to include and put the files...
2-After that go to pawno and click on include folder and put the files again and it may be fixed
correct me if I am wrong
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
I would counter that the usage of too few includes messes up a script but an error in one can cause a cascade failure of others. This is why you always fix the FIRST error then recompile.
Posts: 882
Threads: 50
Joined: Jun 2012
Reputation:
0
You probably got errors because your includes had dependent code(this include depends on another include).
When you make includes, you must ensure that they work independently.Or you'll have to include two or more includes which makes no sense.The purpose of using includes is lost.
Make includes like when you have lot of defines/strings/etc which you are going to use in difference scripts.
For example,
#define TEAM_A 1
#define TEAM_B 2
const TeamStrings[][] =
{
"none", "Team A",Team B"
};
Keep such codes in an include.It will help you with inter-script communication.
No, there is no limit for includes. If there was then modular scripts would be impossible.
#include simply reads the output of the included file and appends it to your gamemode upon .AMX compilation. If you have errors from using a lot of includes, then one of them probably has some faulty code (e.g. improper hooking, colliding with existing variables/function names, etc).