Hallo immer wenn ich meinen Account Laden Will kommt folgender Mysql error
[Mon Nov 28 20:57:31 2011] Connected (0) to samp518 @ localhost via TCP/IP.
[Mon Nov 28 20:57:31 2011] MySQL Server Version 5.5.16.
[Mon Nov 28 20:58:32 2011] Error (0): Function: mysql_store_result called when no prior successful query executed.
[Mon Nov 28 20:58:32 2011] Error (0): Function: mysql_fetch_int called when no result stored.
[Mon Nov 28 20:58:32 2011] Error (0): Function: mysql_store_result called when no prior successful query executed.
[Mon Nov 28 20:58:32 2011] Error (0): Function: mysql_fetch_int called when no result stored.
[Mon Nov 28 20:58:32 2011] Error (0): Could not execute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:01:25 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:01:25 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:02:13 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:02:13 2011] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:02:13 2011] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:02:16 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:02:28 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:02:28 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:03:00 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:03:00 2011] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:03:00 2011] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:03:09 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Mon Nov 28 21:03:09 2011] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
Alles anzeigen
Ich nutze das plugin von strickenkid und das include c-mysql
hier die stelle aus meinem Script
public LoadAcc(playerid)
{
SetPVarInt(playerid, "loggedin", 1);
new tmp, pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
CMySQL_Int(pName,"Admin", tmp);
SetPVarInt(playerid, "admin", tmp);
CMySQL_Int(pName,"Bank", tmp);
SetPVarInt(playerid, "Bank", tmp);
return 1;
}
Hier die stelle aus dem Include
}
stock CMySQL_Int(Username[], Field[], ThreadID = -1, extraID = -1) {
mysql_real_escape_string(ACCOUNT_TABLE, SQLEscapeX[0]);
mysql_real_escape_string(USERNAME_FIELD, SQLEscapeX[1]);
mysql_real_escape_string(Username, SQLEscapeX[2]);
mysql_real_escape_string(Field, SQLEscapeX[3]);
if(ThreadID != -1 && extraID != -1) {
format(SQLEscapeX[5], 128, "SELECT %s FROM %s WHERE %s = '%s'", SQLEscapeX[3], SQLEscapeX[0], SQLEscapeX[1], SQLEscapeX[2]);
return mysql_query(SQLEscapeX[5], ThreadID, extraID);
}
format(SQLEscapeX[5], 128, "SELECT %s FROM %s WHERE %s = '%s'", SQLEscapeX[3], SQLEscapeX[0], SQLEscapeX[1], SQLEscapeX[2]);
mysql_query(SQLEscapeX[5], ThreadID, extraID);
mysql_store_result();
new ReturnedValue = mysql_fetch_int();
mysql_free_result();
return ReturnedValue;
}
//noch ein Fehler..
In meinem phpmyadmin steht das ich kein index definiert habe...
//fehler gefunden...
public LoadAcc(playerid)
{
SetPVarInt(playerid, "loggedin", 1);
SetPVarInt(playerid, "admin", CMySQL_Int(GetUserName(playerid), "Admin"));
SetPVarInt(playerid, "Bank", CMySQL_Int(pName, "Bank"));
return 1;
}