Editing
ACS directives
From Eternity Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
''This page contains text copied from the ZDoom wiki'' A '''directive''' in an [[ACS]] command beginning with a hash (or sharp) character (#); in the fashion of the {{wp|C preprocessor}} directives. Existing directives include: *'''<nowiki>#include</nowiki>''' ''filename'' :Includes the content of the given filename. It is generally used to include the common definition file ''zcommon.acs''. *'''<nowiki>#library</nowiki>''' ''name'' :Defines the following code as a [[library]]. If used, it should be the very first directive, above even {{c|#include "zcommon.acs"}}. *'''<nowiki>#import</nowiki>''' ''library_name'' :Imports a [[library]]. This allows to use [[ACS|scripts]], [[functions]], and [[constants]] defined in the library. Libraries should not be #included! *'''<nowiki>#define</nowiki>''' ''constant_name'' ''value'' :This gives a text name to a value, allowing to make the code more readable and easier to update if a same value has to be used in several places. Constant names should only include uppercase letters, numerals, and underscores. *'''<nowiki>#libdefine</nowiki>''' ''constant_name'' ''value'' :This is an alternative to #define which is used in libraries. A #libdefined constant can be used by scripts that #import the library that defined it. *'''<nowiki>#nocompact</nowiki>''' :This directive prevents the compiler from "compacting" or "shrinking" the bytecode where possible. In effect, this forces it to use the ACSE format instead of the ACSe format. It has no effect if compiling in ACS0 format. *'''<nowiki>#wadauthor</nowiki>''' :Forces the compiler to create a "valid" ACS0 stub (in addition to the ACSe or ACSE bytecode) so that some old error checkers will not report ACS errors. *'''<nowiki>#nowadauthor</nowiki>''' :Forces the compiler ''not'' to create a valid ACS0 stub. The bytecode will be slightly smaller as a result, but some old error checkers will mistakenly report that the compiled ACS is broken. *'''<nowiki>#region</nowiki>''' *'''<nowiki>#endregion</nowiki>''' :Define the start ({{c|#region}}) and end ({{c|#endregion}}) of a fold-able block of code. This is of use with text editors which support the ability to define ''code folders'' such as [https://doomwiki.org/wiki/Doom_Builder_2#Forks GZDoom Builder]'s script editor. ==See also== *[[ACS scripting]] [[Category:ACS]] [[Category:Editing reference]]
Summary:
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
Eternity Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:C
(
edit
)
Template:Wp
(
edit
)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information