A few quick questions on some PAWN Directives - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A few quick questions on some PAWN Directives (
/showthread.php?tid=281259)
A few quick questions on some PAWN Directives -
dowster - 05.09.2011
Quote:
Originally Posted by PAWN Language Guide
#file name
Adjusts the name for the current file. This directive is used implicitly by the text preprocessor; there is usually no need to set a
filename explicitly
|
Does this mean you can specify what the exported .amx will be named? so if i wanted to name the exported file dowsters-gm-v2.5.amx i could specify that instead of renaming the gamemode after i have compiled it or renaming the .pwn?
Also,
Quote:
Originally Posted by PAWN Language Guide
#section name
Starts a new section for the generated code. Any variables and
functions that are declared “static” are only visible to the section
to which they belong. By default, each source file is a separate
section and there is only one section per file.
With the #section directive, you can create multiple sections in a
source file. The name of a section is optional, if it is not set, a unique
identifier for the source file is used for the name of the section.
Any declared section ends automatically at the end of the file
|
means that if in the beginning of my game mode i specify some variables
pawn Код:
new gLoggedPlayers, gAFKPlayers;)
but then about half way through my game mode i do
Now when i try to use the gLoggedPlayers and gAFKPlayers it will report an error correct?
AW: A few quick questions on some PAWN Directives -
Arrows73 - 05.09.2011
I never tried those things but as far as i see it should be correct.
Re: A few quick questions on some PAWN Directives -
Vince - 05.09.2011
I'm not sure about the #file directive, but the #section directive definitely does not work. I already tried it. It just pops up:
error 031: unknown directive.
Re: A few quick questions on some PAWN Directives -
Ash. - 05.09.2011
About the
directive.
When used, the script compiles, however no name changes are made. I compiled a script called "test" and the .amx file was still called "test", while the directive:
was in the script. So, that doesn't work either!