18.07.2020, 07:43
I dont exactly understand what you are trying to do but if you are just trying to get one id, something like below should work. If you remove break you will see all ids.
Important edit: You should never match database id with in game object id that your script gives. Just create another variable called dbid in your enum and do your database jobs on that id. Its fool proof and less resource requiring since you are taking down your loop workload.
Important edit: You should never match database id with in game object id that your script gives. Just create another variable called dbid in your enum and do your database jobs on that id. Its fool proof and less resource requiring since you are taking down your loop workload.
Code:
for(new i=0; i<maxbiz; i++) { if(biz[i][taken]==free) { //The id you want is i. i is free. Do your action here. Break; } }