SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/02/2012, 01:05 PM   #1
BrandyPenguin
Big Clucker
 
Join Date: Dec 2011
Location: localhost
Posts: 121
Reputation: 10
Default #error doesn't appear on compile

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?
__________________
Pawn, PHP scripter.
BrandyPenguin is offline   Reply With Quote
Old 15/02/2012, 01:10 PM   #2
[MG]Dimi
High-roller
 
[MG]Dimi's Avatar
 
Join Date: Mar 2011
Location: Serbia
Posts: 1,239
Reputation: 144
Default Re: #error doesn't appear on compile

pawn Code:
#if included
instead of
pawn Code:
#if defined
__________________
Scripting Admin/Account/VIP Systems for $$$ using ZCMD,dcmd, Dini, MySQL and sscanf.Scripting IRC Systems with all possible functions. (Echo channels, Chat channels, Admin channels...)Long time Experience with IRC Systems.For both offers PM me
Mini Games ServerServer IP:178.238.236.62:7777
[MG]Dimi is offline   Reply With Quote
Old 15/02/2012, 01:14 PM   #3
BrandyPenguin
Big Clucker
 
Join Date: Dec 2011
Location: localhost
Posts: 121
Reputation: 10
Default Re: #error doesn't appear on compile

What you mean with that?
When i add it on my include i get: Scripts/init.pwn(5) : error 017: undefined symbol "included"
__________________
Pawn, PHP scripter.
BrandyPenguin is offline   Reply With Quote
Old 15/02/2012, 01:25 PM   #4
iPLEOMAX
High-roller
 
iPLEOMAX's Avatar
 
Join Date: Mar 2011
Location: AE
Posts: 1,250
Reputation: 746
Default Re: #error doesn't appear on compile

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.
__________________
Goodbye SA-MP.
iPLEOMAX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error.. danodanodano Help Archive 3 26/06/2011 09:52 AM
compile error Vietnam_Gangstaz Help Archive 5 24/06/2011 10:41 AM
Compile error? Brice|Bryce Help Archive 9 29/05/2010 01:14 PM
Compile Error. Can Someone Compile For Me Please? RolePlay360 Help Archive 2 11/03/2009 09:56 PM


All times are GMT. The time now is 12:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.