cwgxcqwr Posted September 21, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 1 Joined: 08/23/13 Last Seen: February 11, 2015 Share Posted September 21, 2013 (edited) source int instance_create{ ... // Searching a Free Instance // 0 is ignored as this mean "no instance" on maps ARR_FIND(1, MAX_INSTANCE_DB, i, instance_data[i].state == INSTANCE_FREE); if( i >= MAX_INSTANCE_DB ) return -4; ... } I think the MAX_INSTANCE_DB should be replaced by MAX_INSTANCE_DATA because size of instance_data can be found in instance.h. extern struct instance_data instance_data[MAX_INSTANCE_DATA]; Edited September 21, 2013 by cwgxcqwr Link to comment Share on other sites More sharing options...
GmOcean Posted September 26, 2013 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted September 26, 2013 It's using MAX_INSTANCE_DB because only X amount of instances can be created. Also, it cycles through, instance_db.txt to check to see if the name given in the instance_create command, actually exists. Hence the reason for using it. Link to comment Share on other sites More sharing options...
Akinari Posted October 16, 2013 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 247 Reputation: 207 Joined: 10/23/12 Last Seen: March 2, 2022 Share Posted October 16, 2013 Fixed in 5bdb25e. Link to comment Share on other sites More sharing options...
Recommended Posts