07.02.2019, 10:47
Hello, I'm having trouble with including files because they depend on each other. Instead of having all the code in one file I decided to split them up in multiple include files. So I have a main file called main.pwn and I'm trying to include 2 files called Events.inc and Player.inc.
But the problem is that Events.inc uses variables that were defined in Player.inc and Player.inc uses macro's that were defined in Events.inc. I know there's an easy fix for this, but I'm trying to split up the files according to their topic, and not their code type.
So no matter what I include first, there's always going to be a problem
or
Is there a way to fix this problem?
But the problem is that Events.inc uses variables that were defined in Player.inc and Player.inc uses macro's that were defined in Events.inc. I know there's an easy fix for this, but I'm trying to split up the files according to their topic, and not their code type.
So no matter what I include first, there's always going to be a problem
Код:
#include "Models/Player.inc" #include <NewEvents>
Код:
#include <NewEvents> #include "Models/Player.inc"