Jump to content
Chris_37

Removing playeruid from an array

Recommended Posts

Hello wondering if anyone could help me,

 

ive currently done this 

 _group_name = _myGroup select 0;
_group_leaders = _myGroup select 1;
_group_members = _myGroup select 2;
_group_funds = _myGroup  select 3;
_group_wars = _myGroup select 4;

 

_uid = getPlayerUID player;
serverGroups deleteAt (_group_members find _uid);

publicVariable "serverGroups";
 

however this seems to delete everything within serverGroups

Share this post


Link to post
Share on other sites

it deletes everything because you get the index from _group_members and delete from serverGroups 

 

the _group_members remains same but serverGroups becomes empty....

Share this post


Link to post
Share on other sites
17 minutes ago, gc8 said:

it deletes everything because you get the index from _group_members and delete from serverGroups 

 

the _group_members remains same but serverGroups becomes empty....

oh so how could i just delete the the uid in _group_members?

Share this post


Link to post
Share on other sites
3 minutes ago, Chris_37 said:

oh so how could i just delete the the uid in _group_members?

 

_group_members deleteAt (_group_members find _uid);

 

like that, you almost had it :)

 

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

×