cwgxcqwr Posted September 21, 2013 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
GmOcean Posted September 26, 2013 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.
Recommended Posts