Jump to content
muju

Can someone help me with this script?

Recommended Posts

Can someone help me with this enemy group tracks player group script? It worked perfectly in Arma 2 on dedicated server.

 

if (isserver) then {
  _grp = _this select 0;
  _trg = _this select 1;
  _delay = (if (count _this > 2) then {_this select 2} else {10});

  while {
    ({alive _x} count units _grp > 0) &&  ({alive _x} count units _trg > 0)
  } do { 
    _grp move getpos leader _trg;
    sleep _delay;
  };
};

 

Now Arma 3 generates this error...

 

https://ibb.co/x8F73qf

 

 

Script is executed in init.sqf with line below...
if (alive hunter1) then {nul=[huntgrp1,keke,10] execVM "scripts\trackdown.sqf";};

Share this post


Link to post
Share on other sites

The error is indicating you haven't assigned a group as huntgrp1.

 

In the script _grp is nil, thus an undefined variable error on _grp.

  • Like 1

Share this post


Link to post
Share on other sites

To be honest that linked image looks like its a couple of error reports over the top of each other. Might be worth referencing your rpt log instead as it'll show you all of them. 

  • Like 2

Share this post


Link to post
Share on other sites

I think, i solved the problem. Thanks anyway!

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

×