mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Change count back to forEach - fix empty safes
See Kronzky's note: https://community.bistudio.com/wiki/count You can only use count to iterate through an array if all elements in the array are of the same data type. In this case you have an array with strings (type), arrays (worldspace, inventory, hitpoints) and numbers (fuel, ownerID). You need to use forEach instead. This error explains the problem people were having with safe inventories being empty when they open them after a restart: http://epochmod.com/forum/index.php?/topic/13423-safe-is-empty-after-restart-if-you-open-it/ https://github.com/vbawol/DayZ-Epoch/issues/1368 https://github.com/vbawol/DayZ-Epoch/issues/1422
This commit is contained in:
@@ -256,7 +256,7 @@ if (isServer && isNil "sm_done") then {
|
||||
//Monitor the object
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
};
|
||||
} count (_BuildingQueue + _objectQueue);
|
||||
} forEach (_BuildingQueue + _objectQueue);
|
||||
// # END SPAWN OBJECTS #
|
||||
|
||||
// preload server traders menu data into cache
|
||||
|
||||
Reference in New Issue
Block a user