Quote:
Originally Posted by trablon
Hey buddy..
Could you try to move printf function like this?
NOTE: If it still doesn't display, tell me and i'll fix it for you.
PHP код:
forward LoadStuff();
public LoadStuff()
{
new rows = cache_num_rows(),id, loaded=0;
if(rows)
{
while(loaded < rows)
{
id = cache_get_field_content_int(loaded, "ID");
cache_get_field_content(loaded, "Name", StuffInfo[id][sName], .max_len = MAX_STUFF_NAME);
StuffInfo[id][sType] = cache_get_field_content_int(loaded, "Type");
StuffInfo[id][sEconomyType] = cache_get_field_content_int(loaded, "EconomyType");
StuffInfo[id][sTax] = cache_get_field_content_int(loaded, "Tax");
StuffInfo[id][sVault] = cache_get_field_content_int(loaded, "Vault");
loaded++;
}
}
printf(" [Stuff System] Loaded %d stuff.", loaded);
return 1;
}
|
Pretty sure that's a bad idea because loaded is outside of the defined brackets. So basically it wouldn't work or compile.