help a newb what is #define and #include
#2

I like your enthusiasm and innovation to learn the basics! With this I must congratulate you sir.

The #include is normally included at the top/beginning of this script. An include can contain functions which can used in the process of scripting. When starting a new script, the 'a_samp' include is already included, as this contains some very useful functions such as 'SendClientMessage' etc... The ZCMD include contains it's native functions which help process the following code and parameters of a command. Example:

pawn Код:
CMD:hello(playerid, params[])
{
   SendClientMessage(playerid, COLOR, "Hello!")
}
The ZCMD include and the a_samp contains all the necessary functions for the command to process and function correctly. Without the include, you will receive errors as the compiler can simply not recognize 'what is being stated/used'.

So to simplify, includes are necessary when scripting. They contain the 'information' in which the compiler can recognize to process what you have coded.

Hope that helps.
Reply


Messages In This Thread
help a newb what is #define and #include - by crowb14 - 13.07.2011, 21:14
Re: help a newb what is #define and #include - by Kush - 13.07.2011, 21:29
Re: help a newb what is #define and #include - by crowb14 - 13.07.2011, 21:31
Re: help a newb what is #define and #include - by Cameltoe - 13.07.2011, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)