Help! DZAI running fine, but error in RPT I can't figure out. Thanks

DangerRuss

OpenDayZ Rockstar!
Can't figure out where the zero divisor is located to fix it! Can anyone help me!?
Code:
20:21:05 Error in expression <ID _player);
_lastSpawned = _timestamps select _index;
_spawnChance = (((time - >
20:21:05   Error position: <select _index;
_spawnChance = (((time - >
20:21:05   Error Zero divisor
20:21:05 File z\addons\dayz_server\DZAI\scripts\dynamicSpawn_manager.sqf, line 67
 
I would look here: z\addons\dayz_server\DZAI\scripts\dynamicSpawn_manager.sqf, except check line 68, not 67. Start your detective work there. I haven't played any Overwatch or DayZ 1.8 at all this year, therefore I'm behind on the current version of DZAI, but personally, I'd start where I recommended.

I hope that dynamicSpawn_manager.sqf has the answers you seek.
 
I would look here: z\addons\dayz_server\DZAI\scripts\dynamicSpawn_manager.sqf, except check line 68, not 67. Start your detective work there. I haven't played any Overwatch or DayZ 1.8 at all this year, therefore I'm behind on the current version of DZAI, but personally, I'd start where I recommended.

I hope that dynamicSpawn_manager.sqf has the answers you seek.

Yea I did look there but im not sure what its trying to tell me....
Code:
_spawnChance = (((time - _lastSpawned) / _maxSpawnTime) min 0.95);
and here is my maxSpawnTime
Code:
DZAI_maxSpawnTime = 3000;

Im not sure where its getting a zero divisor from.... Neither the spawnChance, nor the lastSpawned are in the config, only the maxSpawnTime is. It says the higher the number, the lower the spawn rate.
 
Make sure you're running the most recent version (1.9.9). I still see a maximum spawn chance limit, which I removed recently.

Sent from my Nexus 5 using Tapatalk
 
Looking at the code, an Error Zero Divisor could happen if a player logs out or changes skin during the player selection process for dynamic spawns. For now, try this edit and see if the error comes back. Before you do this, make sure you update to 1.9.9 first.

1. Search for this line:

Code:
while {((_maxSpawnsPossible - _activeDynamicSpawns) > 0) && ((count _allPlayers) > 0)} do {

2. Replace it with this:

Code:
while {_allPlayers = _allPlayers - [objNull]; ((_maxSpawnsPossible - _activeDynamicSpawns) > 0) && {(count _allPlayers) > 0}} do {

Doing this will purge the _allPlayers array of all invalid characters before doing random selections.
 
Looking at the code, an Error Zero Divisor could happen if a player logs out or changes skin during the player selection process for dynamic spawns. For now, try this edit and see if the error comes back. Before you do this, make sure you update to 1.9.9 first.

1. Search for this line:

Code:
while {((_maxSpawnsPossible - _activeDynamicSpawns) > 0) && ((count _allPlayers) > 0)} do {

2. Replace it with this:

Code:
while {_allPlayers = _allPlayers - [objNull]; ((_maxSpawnsPossible - _activeDynamicSpawns) > 0) && {(count _allPlayers) > 0}} do {

Doing this will purge the _allPlayers array of all invalid characters before doing random selections.

Ah, yes I am not running the most recent version, I guess I should pay more attention. I'll update it, and if the problem persists I'll try this. Thanks for your time.
 
Back
Top