SA-MP Forums Archive
mysql_log errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql_log errors (/showthread.php?tid=505301)



mysql_log errors - AphexCCFC - 07.04.2014

pawn Код:
public AccountLoad(playerid)
{
    new temp[40], pname[24];
    GetPlayerName(playerid, pname, 24);
    format(temp, sizeof(temp), "SERVER: Welcome %s", pname);
    SendClientMessage(playerid, -1, temp);

    // Field indexes are relative to the query.
    PlayerInfo[playerid][pLevel] =  cache_get_row_int(0, 2, g_Handle);
    PlayerInfo[playerid][pCash] =   cache_get_row_int(0, 3, g_Handle);
    PlayerInfo[playerid][pHealth] = cache_get_row_float(0, 4, g_Handle);
    PlayerInfo[playerid][pPos][0] = cache_get_row_float(0, 5, g_Handle);
    PlayerInfo[playerid][pPos][1] = cache_get_row_float(0, 6, g_Handle);
    PlayerInfo[playerid][pPos][2] = cache_get_row_float(0, 7, g_Handle);
    PlayerInfo[playerid][pPos][3] = cache_get_row_float(0, 8, g_Handle);
    cache_get_row(0, 9, temp, g_Handle), PlayerInfo[playerid][pIP] = strval(temp);

    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetSpawnInfo(playerid, 0, DefaultSkin, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2], PlayerInfo[playerid][pPos][3], 0, 0, 0, 0, 0, 0);
    SpawnPlayer(playerid);
    return 1;
}
Код:
[22:28:03] [WARNING] cache_get_data - no active cache
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('2')
[22:28:03] [ERROR] cache_get_row_int - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('3')
[22:28:03] [ERROR] cache_get_row_int - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('4')
[22:28:03] [ERROR] cache_get_row_float - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('5')
[22:28:03] [ERROR] cache_get_row_float - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('6')
[22:28:03] [ERROR] cache_get_row_float - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('7')
[22:28:03] [ERROR] cache_get_row_float - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('8')
[22:28:03] [ERROR] cache_get_row_float - invalid datatype
[22:28:03] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('9')
The rows and indexes are correct and the datatypes too?






Re: mysql_log errors - Binx - 08.04.2014

First off, hash your passwords using Whirlpool. Second, money should be "9", it might not make a difference but it'll help. Third, activate the cache(from false to true) when executing OnPlayerLoad. Fourth, PLEASE add an ID column, set it to Primary Index and A_I.