SQLite wont load table?
#4

pawn Код:
stock LoadFaction(ID)
{
    new Query[60], DBResult:Result;
    format(Query, sizeof(Query), "SELECT * FROM `FACTIONS` WHERE `ID` = %d LIMIT 1", ID);
    Result = db_query(survival, Query);
    if(db_num_rows(Result))
    {
        new Field[30];
        db_get_field_assoc(Result, "NAME", Field, 30);
        FactionInfo[ID][fName] = Field;
        db_get_field_assoc(Result, "ID", Field, 30);
        FactionInfo[ID][fID] = strval(Field);
        db_get_field_assoc(Result, "INTX", Field, 30);
        FactionInfo[ID][fHQintX] = floatstr(Field);
        db_get_field_assoc(Result, "INTY", Field, 30);
        FactionInfo[ID][fHQintY] = floatstr(Field);
        db_get_field_assoc(Result, "INTZ", Field, 30);
        FactionInfo[ID][fHQintZ] = floatstr(Field);
        db_get_field_assoc(Result, "EXTX", Field, 30);
        FactionInfo[ID][fHQextX] = floatstr(Field);
        db_get_field_assoc(Result, "EXTY", Field, 30);
        FactionInfo[ID][fHQextY] = floatstr(Field);
        db_get_field_assoc(Result, "EXTZ", Field, 30);
        FactionInfo[ID][fHQextZ] = floatstr(Field);
        db_get_field_assoc(Result, "VW", Field, 30);
        FactionInfo[ID][fHQVW] = strval(Field);
        db_get_field_assoc(Result, "INT", Field, 30);
        FactionInfo[ID][fHQint] = strval(Field);
        db_get_field_assoc(Result, "CREATED", Field, 30);
        FactionInfo[ID][fCreated] = strval(Field);
    }
    db_free_result(Result);
    print(Query);
    return printf("Faction ID %d loaded successfully", ID);
}
and it should be

pawn Код:
if(FactionInfo[i][fCreated] == 0)
?
Reply


Messages In This Thread
SQLite wont load table? - by Mattakil - 03.10.2013, 18:40
Re: SQLite wont load table? - by Jefff - 03.10.2013, 19:43
Re: SQLite wont load table? - by Mattakil - 03.10.2013, 22:09
Re: SQLite wont load table? - by Jefff - 04.10.2013, 00:23
Re: SQLite wont load table? - by Mattakil - 04.10.2013, 13:36
Re: SQLite wont load table? - by Jefff - 04.10.2013, 17:04
Re: SQLite wont load table? - by Konstantinos - 04.10.2013, 17:08
Re: SQLite wont load table? - by Mattakil - 04.10.2013, 19:27
Re: SQLite wont load table? - by Mattakil - 04.10.2013, 19:38

Forum Jump:


Users browsing this thread: 2 Guest(s)