jeudi 23 juillet 2015

printf message not displaying

Well basically I made this code below, Everything loads fine but the thing is it doesn't tell you how many items it loaded in the printf message. I'm not sure what's wrong.

Code:

forward LoadStuff();
public LoadStuff()
{
        new rows = cache_num_rows();
        if(rows)
          {
                  new id, loaded;
                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;
}



Aucun commentaire:

Enregistrer un commentaire