#error doesn't appear on compile
#1

I added to my include:
pawn Code:
#if !defined _Script_Init
    #define _Script_Init
#else  
    #error Double Include
    //#endinput
#endif
And for check it i add my GameMode:
pawn Code:
#include "Scripts/init.pwn"
#include "Scripts/init.pwn"
And i Will not get error when i compile.
What is wrong with this?
Reply
#2

pawn Code:
#if included
instead of
pawn Code:
#if defined
Reply
#3

What you mean with that?
When i add it on my include i get: Scripts/init.pwn(5) : error 017: undefined symbol "included"
Reply
#4

No need to do that, just use:
pawn Code:
#if defined _Script_Init
      #endinput
#endif
Now, if you do:
pawn Code:
#include "Scripts/init.pwn"
#include "Scripts/init.pwn"
#include "Scripts/init.pwn"
#include "Scripts/init.pwn"
#include "Scripts/init.pwn"
Nothing will go wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)