Services not saving
#1

Alright, well they are loading perfectly fine but they don't seem to be saving to the variables within the enum.
pawn Код:
enum sInfo
{
    sType,
    sFunds,
    sName[128],
}
new ServiceInfo[MAX_SERVICES][sInfo];
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.
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();
}
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.

Код:
[11:08:24] 1|150001|TESTING
[11:08:24] DEBUG: 1 Services Loaded.
As you can see they are loading correctly.

But when I do a debug command.
Код:
[11:08:35] SERVICES: , 0, $150001.
Which is very confusing.
Reply


Messages In This Thread
Services not saving - by Luis- - 05.09.2011, 10:11
Re: Services not saving - by The_Moddler - 05.09.2011, 10:20
Re: Services not saving - by Luis- - 05.09.2011, 10:21
Re: Services not saving - by Cyanide - 05.09.2011, 10:40
Re: Services not saving - by Luis- - 05.09.2011, 10:52
Re: Services not saving - by Cyanide - 05.09.2011, 11:00
Re: Services not saving - by Luis- - 05.09.2011, 11:00
Re: Services not saving - by Cyanide - 05.09.2011, 11:06
Re: Services not saving - by Luis- - 05.09.2011, 11:15
Re: Services not saving - by Luis- - 05.09.2011, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)