[MySQL] "cache_get_field_content_int" no active cache
#4

Quote:
Originally Posted by d3ll
View Post
pawn Code:
forward LoadAccount(playerid);
pawn Code:
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `playerdata` WHERE `Name` = '%s' LIMIT 1", pname);
mysql_tquery(mysql, query, "LoadAccount", "i", playerid);
pawn Code:
public LoadAccount(playerid)
{
    cache_get_field_content(0, "IP", PlayerInfo[playerid][IP]);
    IsLogged[playerid] = 1;
    return 1;
}
Try this, IP has to get loaded as a string no?
Yeah. I tried that already same error.
Quote:
Originally Posted by iZN
View Post
pawn Code:
forward LoadAccount(playerid);
public LoadAccount(playerid)
{
    if(!cache_get_row_count())
    {
        // No registration found - they need to be registered!
        return true;
    }

    new szQuery[16];

    // Now we will continue in order to complete our query
    PlayerInfo[playerid][IP] = cache_get_field_content(0, "IP", szQuery);
    return true;
}
Gives an argument mismatch here:
pawn Code:
PlayerInfo[playerid][IP] = cache_get_field_content(0, "IP", szQuery);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)