10.12.2014, 21:39
pawn Код:
loadStuff()
{
new rows, fields;
print("==> Loading the Required Items.");
cache_get_data(rows, fields);
if(!rows)
{
print("ERROR: The Table you called the query on can't be found. Skipping the loading.");
}
else
{
if(rows > MAX_CHECKS)
{
print("ERROR: Limit exceeded.");
return 1;
}
for(new i = 0; i < rows; i++)
{
cache_get_field_content(i, "Name", stuffInfo[i][Name], mysql, 60);
cache_get_field_content(i, "stuffC", string, mysql, 30); //string declared before the start of the callback.
stuffInfo[i][ID] = cache_get_field_content_int(i, "stuffID");
}
printf("==> Loaded %i of the required stuff", rows);
}
return 1;
}