05.09.2011, 10:11
Alright, well they are loading perfectly fine but they don't seem to be saving to the variables within the enum.
I have got the funds to save to the variable so they display perfectly well.
Although the type & name don't want to save, here are my codes.
I have been trying to get this working most of this morning and last night but still haven't got it to work correctly. Here are the logs.
As you can see they are loading correctly.
But when I do a debug command.
Which is very confusing.
pawn Код:
enum sInfo
{
sType,
sFunds,
sName[128],
}
new ServiceInfo[MAX_SERVICES][sInfo];
Although the type & name don't want to save, here are my codes.
pawn Код:
forward LoadServices();
public LoadServices()
{
new
line[512],
placeholder
;
mysql_query("SELECT * FROM services LIMIT " #MAX_SERVICES "");
mysql_store_result();
while(mysql_fetch_row_format(line))
{
new data[3];
sscanf(line, "p<|>ddds[128]", placeholder, data[0], data[1], data[2]);
print(line);
ServiceInfo[services][sFunds] = data[0];
ServiceInfo[services][sType] = data[1];
ServiceInfo[services][sName] = data[2];
services++;
printf("DEBUG: %i Services Loaded.", services);
}
mysql_free_result();
}
Код:
[11:08:24] 1|150001|TESTING [11:08:24] DEBUG: 1 Services Loaded.
But when I do a debug command.
Код:
[11:08:35] SERVICES: , 0, $150001.