A few quick questions on some PAWN Directives
#1

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
pawn Код:
#section shakenbake
Now when i try to use the gLoggedPlayers and gAFKPlayers it will report an error correct?
Reply
#2

I never tried those things but as far as i see it should be correct.
Reply
#3

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.
Reply
#4

About the
pawn Код:
#file (name)
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:
pawn Код:
#file "NameChanged"
was in the script. So, that doesn't work either!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)