Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: NeskWriter on October 29, 2013, 05:00:55 pm

Title: Wanna write include
Post by: NeskWriter on October 29, 2013, 05:00:55 pm
Hye dudes. I wanna try writing my own include but I dunno how to deal with shit like "#endif #if_defined #define #etc". I want veteran scripters to explain
Title: Re: Wanna write include
Post by: Fuzzy168 on October 30, 2013, 09:32:10 am
I'm not a veteran in Pawn but I've dealt with these in C++. Those things are similar to the way you use if statements.

Let's say we have this somewhere on the top.
Code: [Select]
#define foo 1
You can then use #endif, #if_defined, etc like this
Code: [Select]
#if_defined foo
    //Something here
#endif

Don't know if I used the correct syntax as the things I learned is for C++.
Title: Re: Wanna write include
Post by: NeskWriter on October 30, 2013, 11:11:11 am
I'm not a veteran in Pawn but I've dealt with these in C++. Those things are similar to the way you use if statements.

Let's say we have this somewhere on the top.
Code: [Select]
#define foo 1
You can then use #endif, #if_defined, etc like this
Code: [Select]
#if_defined foo
    //Something here
#endif

Don't know if I used the correct syntax as the things I learned is for C++.

Ty, and yeah, is it optional or no?
Title: Re: Wanna write include
Post by: Fuzzy168 on October 30, 2013, 11:33:39 am
It is optional.
Title: Re: Wanna write include
Post by: NeskWriter on October 30, 2013, 12:42:39 pm
It is optional.

Thx