OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Doolittle on 27 Aug 2009, 01:21:04

Title: Make global #define?
Post by: Doolittle on 27 Aug 2009, 01:21:04
Is it possible to create a "global" #define in a mission? I.e. in init.sqf I have:

#define foo hint

In every other script that runs, I'd like to use foo and have it rep. hint. Is this possible? Thanks!
Title: Re: Make global #define?
Post by: Mandoble on 27 Aug 2009, 01:31:57
You can try
Code: [Select]
// init.sqf
#define MyHint(X) (hint X)

MyHint ("Hello");
Title: Re: Make global #define?
Post by: i0n0s on 27 Aug 2009, 01:43:30
It's only possible to put all macros in one file, then include the file everywhere it is required.
Title: Re: Make global #define?
Post by: Doolittle on 27 Aug 2009, 19:35:33
That's what I feared... okay, thanks guys. I was hoping to do:

#define debugLog localize

..so I could get feedback from BIS modules. >:(
Title: Re: Make global #define?
Post by: kju on 27 Aug 2009, 20:39:49
well why not unpacked the modules.pbo, mass search and replace, and repack?!