Home   Help Search Login Register  

Author Topic: Make global #define?  (Read 1415 times)

0 Members and 1 Guest are viewing this topic.

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Make global #define?
« 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!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Make global #define?
« Reply #1 on: 27 Aug 2009, 01:31:57 »
You can try
Code: [Select]
// init.sqf
#define MyHint(X) (hint X)

MyHint ("Hello");

Offline i0n0s

  • Moderator
  • *****
Re: Make global #define?
« Reply #2 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.

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re: Make global #define?
« Reply #3 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. >:(

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Make global #define?
« Reply #4 on: 27 Aug 2009, 20:39:49 »
well why not unpacked the modules.pbo, mass search and replace, and repack?!