DooMBoy Posted October 7, 2002 Could someone please explain to me exactly how #Define is used in a script? I can't seem to get it to work... 0 Share this post Link to post
Volte Posted October 7, 2002 Well, in standard C it's like this: #define <constant> <value> so #define PRG_SOMEVALUE 7 would create the constant 'PRG_SOMEVALUE' and assign it the value of 7. Then, in place of '7' in your program, you could use PRG_SOMEVALUE for readability. You can also use #define to make simple functions, but I don't know if ACS supports that. Also, I haven't used C in years, so forgive me if I'm wrong. 0 Share this post Link to post
mmnpsrsoskl Posted October 8, 2002 ZDoom Editing Manual: Define Replaces an identifier with a constant expression. #define <identifier> <constant-expression> Whenever "identifier" is used in the source, the "constant-expression" is substituted. This is similar to a macro or keyboard short-cut. Does that help? 0 Share this post Link to post