Problem with own include
#1

Hi, I'm re-writing my 35k lines script to optimize it and all but I have a problem. To increase readability I've divided my GM in different includes. Here is the code at the very top of my GM:

pawn Код:
#include <a_samp>
#include <mysql>
#include <foreach>
#include <sscanf2>
#include <zcmd>

#include "../include/system/defines.inc"
#include "../include/system/variables.inc"
#include "../include/system/general-functions.inc"
#include "../include/system/log-system.inc"
#include "../include/system/sql-system.inc"
//#include "../include/system/streaming-system.inc"
#include "../include/system/authentification-system.inc"
#include "../include/system/anticheat-system.inc"
#include "../include/system/npcs-settings.inc"

#include "../include/staff/admin-system.inc"
//#include "../include/staff/rps-system.inc"

#include "../include/communication-system/chatting-system.inc"
#include "../include/communication-system/animation-system.inc"
#include "../include/communication-system/phone-system.inc"
//#include "../include/communication-system/radio-system.inc"

//#include "../include/economy/bank-system.inc"
#include "../include/economy/business-system.inc"
//#include "../include/economy/job-system.inc"
//#include "../include/economy/purchasing-system.inc"

//#include "../include/habitations-and-vehicles/apartment-system.inc"
//#include "../include/habitations-and-vehicles/house-system.inc"
//#include "../include/habitations-and-vehicles/safe-system.inc"
#include "../include/habitations-and-vehicles/vehicle-system.inc"

//#include "../include/illegal_system/alcool-and-drug-system.inc"
//#include "../include/illegal_system/drug-and-weapon-traffic.inc"
//#include "../include/illegal_system/faction-system.inc"
//#include "../include/illegal_system/violence-system.inc"
//#include "../include/illegal_system/weapon-system.inc"

#include "../include/bcl_other.inc"
Some includes are on comment because they aren't coded yet. So let's lead to my problem: the include I put under the line '#include "../include/communication-system/chatting-system.inc"' isn't read. It's like the line wasn't existing. If I write the name of an include which doesn't exist, I won't get an error.

Exemple:
pawn Код:
....
#include "../include/communication-system/chatting-system.inc"
#include ".../include/communication-system/notexisinginc."
....
Won't give an error.

So I tried to put '#include "../include/communication-system/chatting-system.inc"' after the line '#include "../include/communication-system/animation-system.inc"':
pawn Код:
....
#include ".../include/communication-system/animation-system.inc"
#include "../include/communication-system/chatting-system.inc"
....
and then chatting-system.inc wasn't read but animation-system.inc was. WTF?!

This error is really strangeand ANNOYING. I have no idea why this occurs...

Help please.

EDIT: I've continued coding and now this happens with some other includes too. It really gets on my nerves, what the fuck causes this?!

EDIT 2: It works fine if I put the files directly in the folder includes and not in a subfolder.... How to fix this please?

EDIT 3: Found the problem !!!! When the include line is too long, compiler just ignores it >< this should be fixed

EDIT 4: Actullay length doesn't seem to be the cause of the problem...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)