Quote:
Originally Posted by AndySedeyn
I'm relatively new to modular programming. Sometimes an include is not being included for some reason.
Example:
PHP Code:
#include "./AntiCheat/ac_money.pwn"
#include "./AntiCheat/ac_health.pwn"
// Inside ac_money
#if defined _ac_money_included
#endinput
#endif
#define _ac_money_included
// Inside ac_health
#if defined _ac_health_included
#endinput
#endif
#define _ac_health_included
// Under the #include directives in the main file
#if !defined _ac_health_included
#error Anti health hack is not included
#endif
#if !defined _ac_money_included
#error Anti money hack not included
#endif
'ac_money' is included first in the example above and that will show the error: 'Anti health hack not included'.
Changing their position:
PHP Code:
#include "./AntiCheat/ac_health.pwn"
#include "./AntiCheat/ac_money.pwn"
Now it will pop the error: "Anti money hack not included'.
Putting them together in one file works, but I don't want that obviously. Any suggestion on why that could happen? The rest of my modules get included perfectly.
|
Is the folder inside
gamemodes? If yes include them this way
#include "folder/pwnfile.pwn". Also make sure you put the anti-cheat first before other modules just to make sure these hooked function functions properly. also its unnecessary to have.
if !defined directive.