Hey Leute,
ich möchte mithilfe von einem stock, das Inventar eines Spielers laden:
Folgende Fehler kommen (server.log):
[23:14:19] [MySQL] Error (0): Failed to exeute query. Unknown column 'Mats' in 'field list'.
[23:14:20] [MySQL] Error (0): Failed to exeute query. Unknown column 'Coins' in 'field list'.
[23:14:20] [MySQL] Error (0): Failed to exeute query. Unknown column 'Masken' in 'field list'.
[23:14:20] [MySQL] Error (0): Failed to exeute query. Unknown column 'b_zig' in 'field list'.
[23:14:20] [MySQL] Error (0): Failed to exeute query. Unknown column 'm_zig' in 'field list'.
[23:14:20] [MySQL] Error (0): Failed to exeute query. Unknown column 't_zig' in 'field list'.
[23:14:22] [MySQL] Error (0): Failed to exeute query. Unknown column 'Heroin' in 'field list'.
[23:14:22] [MySQL] Error (0): Failed to exeute query. Unknown column 'Marihuana' in 'field list'.
Der Stock:
stock LoadPlayerInv(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
SetPVarInt(playerid,"b_zig", mysql_GetInt("inventar", "b_zig", "Name", name));
SetPVarInt(playerid,"m_zig", mysql_GetInt("inventar", "m_zig", "Name", name));
SetPVarInt(playerid,"t_zig", mysql_GetInt("inventar", "t_zig", "Name", name));
SetPVarInt(playerid,"Mats", mysql_GetInt("inventar", "Mats", "Name", name));
SetPVarInt(playerid,"Marihuana", mysql_GetInt("inventar", "Marihuana", "Name", name));
SetPVarInt(playerid,"Heroin", mysql_GetInt("inventar", "Heroin", "Name", name));
SetPVarInt(playerid,"Coins", mysql_GetInt("inventar", "Coins", "Name", name));
SetPVarInt(playerid,"Kanister", mysql_GetInt("inventar", "Kanister", "Name", name));
SetPVarInt(playerid,"Masken", mysql_GetInt("inventar", "Masken", "Name", name));
}
Die Datein sind aber in der Datenbank, in der Tabelle "inventar"
Muss ich irgendwas noch in der datenbank angeben? (sowas wie primärer Schlüssel?)