mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fix plot manage array add errors from 1e65f7a
@icomrade - when you use set to add an element to an array you do not need to wrap it in brackets [ ] like you do with +. This was making it a nested array which was not intended in the original.
This commit is contained in:
@@ -9,7 +9,7 @@ _inList = false;
|
|||||||
{ if ((_x select 0) == (_toAdd select 0)) exitWith { _inList = true; }; } count _friends;
|
{ if ((_x select 0) == (_toAdd select 0)) exitWith { _inList = true; }; } count _friends;
|
||||||
if (_inList) exitWith {localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST" call dayz_rollingMessages};
|
if (_inList) exitWith {localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST" call dayz_rollingMessages};
|
||||||
if ((count _friends) == DZE_MaxPlotFriends) exitWith { format[localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_FRIENDLIMIT", DZE_MaxPlotFriends] call dayz_rollingMessages;};
|
if ((count _friends) == DZE_MaxPlotFriends) exitWith { format[localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_FRIENDLIMIT", DZE_MaxPlotFriends] call dayz_rollingMessages;};
|
||||||
_friends set [(count _friends), [_toAdd]];;
|
_friends set [(count _friends), _toAdd];
|
||||||
_thePlot setVariable ["plotfriends", _friends, true];
|
_thePlot setVariable ["plotfriends", _friends, true];
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ _toRemove = (_friends select _pos);
|
|||||||
_newList = [];
|
_newList = [];
|
||||||
{
|
{
|
||||||
if(_x select 0 != _toRemove select 0)then{
|
if(_x select 0 != _toRemove select 0)then{
|
||||||
_newList set [(count _newList), [_x]];
|
_newList set [(count _newList), _x];
|
||||||
};
|
};
|
||||||
} count _friends;
|
} count _friends;
|
||||||
_thePlot setVariable ["plotfriends", _newList, true];
|
_thePlot setVariable ["plotfriends", _newList, true];
|
||||||
|
|||||||
Reference in New Issue
Block a user