Author Topic: Wanna write include  (Read 2916 times)

0 Members and 1 Guest are viewing this topic.

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Wanna write include
« 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


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Wanna write include
« Reply #1 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++.
I'm beginning to feel like a Lag God, Lag God

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Wanna write include
« Reply #2 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?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Wanna write include
« Reply #3 on: October 30, 2013, 11:33:39 am »
It is optional.
I'm beginning to feel like a Lag God, Lag God

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Wanna write include
« Reply #4 on: October 30, 2013, 12:42:39 pm »


-Funniest quotes-

Quote from: asad3man
i cant able to understand