Also ich habe die DB so:
Das letzte Fahrzeug einfach kurz wegdenken.
Ich will jetzt wenn sich der User ein neues Fahrzeug zulegt, dass der Slot +1 Geht aber das soll auch nur bei diesen Spieler passieren und nicht die ganze Spalte immer +1
Also ich habe die DB so:
Das letzte Fahrzeug einfach kurz wegdenken.
Ich will jetzt wenn sich der User ein neues Fahrzeug zulegt, dass der Slot +1 Geht aber das soll auch nur bei diesen Spieler passieren und nicht die ganze Spalte immer +1
Habe den Fehler gefunden
mysql_fetch_field("kennzeichen",data); format(cInfo[i][kennzeichen], 64, data);
Musste so (großes K)
mysql_fetch_field("Kennzeichen",data); format(cInfo[i][Kennzeichen], 64, data);
//EDIT
Jetzt hätte ich noch die Frage, ein Spieler soll maximal 5 Autos besitzen, und das soll in die spalte slot eingetragen werden sprich bei dem user in der Tabelle Autos wie kann ich das machen?
Steht das Kennzeichen korrekt in der Datenbank drin, und ist die Spalte in der Datenbank ein VARCHAR mit genügend Zeichen?
Kennzeichen varchar(64) latin1_swedish_ci
LS-000
Wie sieht dein OnPlayerCarsLoad aktuell aus?
public OnPlayerCarsLoad(playerid)
{
new query[128], data[356];
format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%i'",PlayerInfo[playerid][pMySQLID]);
mysql_query(query);
printf("query = %s", query);
mysql_store_result();
new num_rows = mysql_num_rows();
printf("%i num rows",num_rows);
if(num_rows > 0)
{
while(mysql_fetch_row(data))
{
new i=getFreeCarID();
mysql_fetch_field("model",data); cInfo[i][carmodel] = strval(data);
mysql_fetch_field("besitzer",data); cInfo[i][besitzer] = strval(data);
mysql_fetch_field("Farbe1",data); cInfo[i][color_1] = strval(data);
mysql_fetch_field("Farbe2",data); cInfo[i][color_2] = strval(data);
mysql_fetch_field("x",data); cInfo[i][c_x] = floatstr(data);
mysql_fetch_field("y",data); cInfo[i][c_y] = floatstr(data);
mysql_fetch_field("z",data); cInfo[i][c_z] = floatstr(data);
mysql_fetch_field("r",data); cInfo[i][c_r] = floatstr(data);
mysql_fetch_field("id",data); cInfo[i][db_id] = strval(data);
mysql_fetch_field("kennzeichen",data); format(cInfo[i][kennzeichen], 64, data);
cInfo[i][id_x] = CreateVehicle(cInfo[i][carmodel],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],cInfo[i][color_1],cInfo[i][color_2],-1);
SetVehicleNumberPlate(cInfo[i][id_x],cInfo[i][kennzeichen]);
}
}
mysql_free_result();
return 1;
}
Mach doch anstatt
ProxDetector(30.0,playerid,string,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
SendClientMessageToAll(COLOR_GREEN,string);
Ja habe ich
enum carEnum{
id_x,
carmodel,
besitzer,
Float:c_x,
Float:c_y,
Float:c_z,
Float:c_r,
color_1,
color_2,
db_id,
kennzeichen[64],
zugelassen,
}
Es steht jetzt nur eine 1 am Nummernschild
Danke, das geht schon mal und wie kann ich das Kennzeichen aus der DB lesen lassen und dann so setzten lassen?
SetVehicleNumberPlate(cInfo[i][id_x],cInfo[i][kennzeichen]);
Müsste das dann so?
cInfo[i][carmodel] = mysql_GetIntByInt("autos","model","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][besitzer] = mysql_GetIntByInt("autos","besitzer","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][color_1] = mysql_GetIntByInt("autos","farbe1","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][color_2] = mysql_GetIntByInt("autos","farbe2","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][c_x] = mysql_GetFloatByInt("autos","x","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][c_y] = mysql_GetFloatByInt("autos","y","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][c_z] = mysql_GetFloatByInt("autos","z","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][c_r] = mysql_GetFloatByInt("autos","r","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][db_id] = mysql_GetIntByInt("autos","id","besitzer","model",PlayerInfo[playerid][pMySQLID],cInfo[i][carmodel]);
cInfo[i][id_x]=CreateVehicle(cInfo[i][carmodel],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],cInfo[i][color_1],cInfo[i][color_2],-1);
Müsste ich das Model dann auch mit bei machen?
Ich habe 2 Autos aber es lädt 2 mal ein Infernus
[18:59:03] Pickups Max = 2048, Current Pickups = 395
[18:59:03] Your Life - Gamemode
[18:59:03] wurde erfolgreich geladen.
[18:59:03] Number of vehicle models: 101
[18:59:36] Server password has been removed.
[19:00:30] [connection] requests connection cookie.
[19:00:31] [connection] incoming connection: id: 0
[19:00:31] [join] Tim has joined the server ()
[19:00:41] query = SELECT * FROM autos WHERE besitzer='12'
[19:00:41] [MySQL] Error (0): Function: mysql_num_rows called when no result stored.
[19:00:41] 0 num rows
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] Tim hat sich eingeloggt.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[19:00:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
Alles anzeigen
Das kommt dann
Zwecks dem Fehler, du hast mysql_free_result vergessen:
Habe es jetzt so gemacht laden aber immer noch nicht
/Edit
Würde euch eine Funktion helfen wo auch so ähnlich sachen geladen werden wie navi punkte aus der Datenbank ?
[22:05:14] --- Server Shutting Down.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] Speichere Contracts
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Function: mysql_store_result called when no result stored. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Error (0): Function: mysql_store_result called when no result stored. Commands out of sync; you can't run this command now.
[22:05:14] [MySQL] Closed (0). Logging ended.
[22:05:14]
[22:05:14] ===============================
[22:05:14] sscanf plugin unloaded.
[22:05:14] ===============================
[22:05:14]
*** Streamer Plugin v2.6.1 by Incognito unloaded ***
[22:05:14] SA:MP MySQL Plugin v2.1.1 Unloaded.
[22:05:14]
[22:05:14] ====================
[22:05:14]
[22:05:14] Whirlpool unloaded
[22:05:14]
[22:05:14] ====================
[22:05:14]
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[22:05:22]
[22:05:22] Server Plugins
[22:05:22] --------------
[22:05:22] Loading plugin: sscanf.so
[22:05:22]
[22:05:22] ===============================
[22:05:22] sscanf plugin loaded.
[22:05:22] (c) 2009 Alex "Y_Less" Cole
[22:05:22] 0.3d-R2 500 Players "dnee"
[22:05:22] ===============================
[22:05:22] Loaded.
[22:05:22] Loading plugin: streamer.so
[22:05:22]
*** Streamer Plugin v2.6.1 by Incognito loaded ***
[22:05:22] Loaded.
[22:05:22] Loading plugin: mysql.so
[22:05:22] SA:MP MySQL Plugin v2.1.1 Loaded.
[22:05:22] Loaded.
[22:05:22] Loading plugin: Whirlpool.so
[22:05:22]
[22:05:22] ==================
[22:05:22]
[22:05:22] Whirlpool loaded
[22:05:22]
[22:05:22] ==================
[22:05:22]
[22:05:22] Loaded.
[22:05:22] Loaded 4 plugins.
[22:05:22] [MySQL] Thread running. Threadsafe: Yes.
[22:05:22]
[22:05:22] Ban list
[22:05:22] --------
[22:05:22] Loaded: samp.ban
[22:05:22]
[22:05:22]
[22:05:22] Filterscripts
[22:05:22] ---------------
[22:05:22] Loaded 0 filterscripts.
[22:05:23] *** Streamer Plugin: Warning: Include file version (0x26104) does not match plugin version (0x26105) (script might need to be recompiled with the latest include file)
[22:05:23] [MySQL] Connected (0) to 'samp5626'@'87.98.243.201 via TCP/IP'.
[22:05:23] [MySQL] Server Version 5.5.49-0+deb7u1.
[22:05:23] MySQL-Verbindung wurde erfolgreich hergestellt
[22:05:23] Wetter ID: 15
[22:05:23] Lade Contracts
[22:05:23] Loading Navipunkte
[22:05:23] 8 Navi Punkte geladen
[22:05:23] Tankstelle 0 geladen
[22:05:23] Tankstelle 1 geladen
[22:05:23] Tankstellen wurden geladen
[22:05:23] Loading Radio System
[22:05:23] 0 Radio Stationen geladen
[22:05:23] Loading lohn
[22:05:23] 25 Lohn Infos geladen
[22:05:23] Loading Saveboxen
[22:05:23] 0 Safeboxen geladen
[22:05:23]
--------------------------------------
[22:05:23] Gangautohaus am laden.
[22:05:23] '112' Fraktionsfahrzeuge wurden geladen & erstellt.
[22:05:23] Gangautohaus geladen.
[22:05:23] Staatsfraktionsautohaus am laden.
[22:05:23] '76' Staatsfraktionsautos wurden geladen & erstellt.
[22:05:23] Staatsfraktionsautohaus geladen.
[22:05:23] --------------------------------------
[22:05:23] Pickups Max = 2048, Current Pickups = 395
[22:05:23] Your Life - Gamemode
[22:05:23] wurde erfolgreich geladen.
[22:05:23] Number of vehicle models: 101
[22:05:54] Server password has been removed.
[22:06:16] [connection] 84.188.103.103:61326 requests connection cookie.
[22:06:17] [connection] incoming connection: 84.188.103.103:61326 id: 0
[22:06:18] [join] Tim has joined the server (0:84.188.103.103)
[22:06:29] [MySQL] Error (0): Function: mysql_num_rows called when no result stored.
[22:06:29] 0 num rows
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] Tim hat sich eingeloggt.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:29] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:39] erfolgreich alles gespeichert!
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[22:06:41] [part] Tim has left the server (0:1)
Alles anzeigen
public OnPlayerCarsLoad(playerid)
{
new query[128];
format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%i'",PlayerInfo[playerid][pMySQLID]);
mysql_query(query);
SendClientMessage(playerid,COLOR_RED,"Bis hier geht es");
new num_rows;
for(new i=0; i<num_rows; i++)
{
new id=getFreeCarID();
SendClientMessage(playerid,COLOR_RED,"Bis hier geht es auch");
cInfo[i][carmodel] = mysql_GetIntByInt("autos","model","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][besitzer] = mysql_GetIntByInt("autos","besitzer","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][c_x] = mysql_GetFloatByInt("autos","x","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][c_y] = mysql_GetFloatByInt("autos","y","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][c_z] = mysql_GetFloatByInt("autos","z","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][c_r] = mysql_GetFloatByInt("autos","r","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][db_id] = mysql_GetIntByInt("autos","id","besitzer",PlayerInfo[playerid][pMySQLID]);
cInfo[i][id_x]=CreateVehicle(cInfo[i][carmodel],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],-1,-1,-1);
}
return 1;
}
Habe es jetzt so geht aber immer noch nicht
Also es muss hier irgendwo liegen
public OnPlayerCarsLoad(playerid){ new query[128]; format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%i'",PlayerInfo[playerid][pMySQLID]); mysql_query(query); SendClientMessage(playerid,COLOR_RED,"Bis hier geht es"); new num_rows = mysql_num_rows(); if(!num_rows)return 1; for(new i=0; i<num_rows; i++) { new id=getFreeCarID(); cInfo[i][carmodel] = mysql_GetIntByInt("autos","model","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][besitzer] = mysql_GetIntByInt("autos","besitzer","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][c_x] = mysql_GetFloatByInt("autos","x","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][c_y] = mysql_GetFloatByInt("autos","y","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][c_z] = mysql_GetFloatByInt("autos","z","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][c_r] = mysql_GetFloatByInt("autos","r","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][db_id] = mysql_GetIntByInt("autos","id","besitzer",PlayerInfo[playerid][pMySQLID]); cInfo[i][id_x]=CreateVehicle(cInfo[i][carmodel],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],-1,-1,-1); } return 1;}
Du nachricht wird an dem Spieler Ingame gesendet
SendClientMessage(playerid,COLOR_RED,"Bis hier geht es");
new num_rows;
if(!num_rows)return 1;
for(new i=0; i<num_rows; i++)
{
new id=getFreeCarID();
SendClientMessage(playerid,COLOR_RED,"Bis hier geht es auch");
Die 2 Nachricht wird nicht mehr angezeigt
Da steht nichts von den Autos mitbei habe ich schon nachgeguckt
Die Fahrzeuge sind aber immer noch nicht da