Jump to content
Sign in to follow this  
lawman_actual

Group name not recognised (type string, expected group)

Recommended Posts

A recurring problem that i seem to run into is I don't know how to use group names as group names when writing scripts.

Let me explain:

 

In the eden editor, I have set the name of a group; by opening the interface for the group (double click on the icon above group leader) and entering something in the 'callsign' field.

However, if I now go to write a script that requires the name of that group, i can't seem to format it in such a way that the command will accept the name I have inputted.

 

For example, here is a snippet from the mission:

 

_group = "R Rustam 1 - Alpha";
_leader = leader _group;
_passangers = _group - _leader;

_leader assignAsDriver qrf_w1;
{_x assignAsCargo qrf_w1} forEach _passangers;


_group orderGetIn true;

 

What i can't get to work is the leader command, because no matter how I format the group name it doesn't seem to want to accept it.

 

I believe the following has been tried without success:

 

_group = "R Rustam 1 - Alpha";
_group = "Rustam 1 - Alpha";
_group = R Rustam 1 - Alpha;
_group = Rustam 1 - Alpha;

 

Share this post


Link to post
Share on other sites

None of the things that you posted are groups.

You're mistaking the group ID (used to display the group in sidechat etc) with the data type group.

The only way to get the group of a unit inside the editor is to use "group this" in the init field of one unit from the group:

 

TAG_fnc_myGroup1 = group this;

 

Then you can access it from anywhere you want like this:

_leader = leader TAG_fnc_myGroup1;

 

Cheers

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Grumpy Old Man said:

The only way to get the group of a unit inside the editor is to use "group this" in the init field of one unit from the group:

 

Not being nitpicky, but you can now click on the group itself and change the group variable name in the "composition/properties dialog".  I didn't realise until the other day when I accidentally clicked on a group and not a unit.

 

There's even a little field in there so you can set the callsign directly and not have to type: nameOfMyGroup setGroupID ["mycoolCallSign"]

 

(just in case you didn't know)  :)

  • Like 1

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
Sign in to follow this  

×