Jump to content

Little bug in EPOCH_server_spawnTraders?


He-Man

Recommended Posts

in serverinit.sqf:

_workload5 = [] call EPOCH_server_spawnTraders;

 

in EPOCH_server_spawnTraders:

while {true} do {...

 

Seems not to be right, or?! But it seems to work?! I thought, call and while isn't working...

Found it:  In non-scheduled environment, while do loop is limited to 10000 iterations

 

And:

                if !(_buildingWork in _usedBuildings) then {

                    _usedBuildings pushBack _building;
have to be:

                if !(_buildingWork in _usedBuildings) then {

                    _usedBuildings pushBack _buildingWork ;

Link to comment
Share on other sites

2 hours ago, vbawol said:

Good catch there I was working on this function today and did not even notice that typo till you mentioned it. I have started to rework this for 0.3.8 and will likely remove the infinite loop.

What about an Option to let the trader spawn random on every restart, but with the stored inventory?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...