Jump to content
Smart Games

Define Arrays in Description.ext?

Recommended Posts

Is there a way to define global arrays in the description.ext?

Atm i have written them into a .sqf file, but i don`t like the idea to call them via init.sqf.

 

Any ideas?

  • Like 1

Share this post


Link to post
Share on other sites

@Smart Games,

Quote

Is there a way to define global arrays in the description.ext?

Yeah. Lose the array and create a cfg class.
description ext.

class cfgNotArray
{
	#include "NotArray.hpp"
};

notArray.hpp

class notArray
	{
		class object_name
		{
			displayName = "A thing"
		};
};

But you know this!

Have fun!

  • Like 2

Share this post


Link to post
Share on other sites

I was more on :

 

Passing arrays with more than one element [el1,el2,...] as arguments into macros as well as any argument containing comas "some, sentence", will need a small workaround:

#define HINTARG(ARG) hint ("Passed argument: " + str ARG)

Incorrect usage:

HINTARG([1,2,3,4,5,6,7,8,9,0]); // ERROR, won't even compile

Correct usage:

#define array1 [1,2,3,4,5,6,7,8,9,0]
HINTARG(array1); // SUCCESS

 

copied from BIKI

  • Like 4

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×