30/09/2022 15:07
Código PHP:
#define MAX_DRUG_FACTORY 16
new drugFactoryTotal;
new drugfactoryList[MAX_DRUG_FACTORY];
stock Push_Drugfactory_List(bizzid) {
if (drugFactoryTotal == MAX_DRUG_FACTORY) {
print("'drugfactoryList' limit reached");
return cellmin;
}
printf("drugfactoryList[%i] = %i", drugFactoryTotal, bizzid);
drugfactoryList[drugFactoryTotal] = bizzid;
return drugFactoryTotal++;
}
public Load_Business() {
new row_count;
if(!cache_get_row_count(row_count))
printf("[CarregarBusiness] MYSQL couldn't retrieve row count");
else {
// printf("There are %d rows in the current result set.", row_count);
for(new i = 0; i < row_count; i++) {
new bizzid = i + 1;
cache_get_value_int(i, "bizzType", BizzInfo[bizzid][bizzType]);
if(BizzInfo[bizzid][bizzType] == 37) {
if (Push_Drugfactory_List(bizzid) == cellmin) {
// break;
// or
continue;
}
}
}
}
}
Infelizmente, devido às limitações da linguagem, terá que ser assim.