Jump to content
  • 0

Errors


Tarzanus

Question

Problema intalnita (descriere): Pai mysql_log spune tot
Ero(area / rile) / warning-(ul / urile):

[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[22:39:16] [ERROR] cache_get_field_content_int - invalid datatype
[22:39:29] [ERROR] mysql_format - no value for specifier "%s" available
[22:39:29] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `ID` = ''' at line 1

Liniile de cod / sursa / script-ul:

forward SavePlayerData(playerid);
public SavePlayerData(playerid)
{
	szQuery[0] = EOS, PaccInfo[playerid][LGIN] = 0;
	mysql_format(Handle, szQuery, 256, "UPDATE `users` SET `Money` = '%d', `Level` = '%d', `VIP` = '%d', `Kills` = '%d', `Deaths` = '%d', `Hours` = '%d', `Mins` = '%d', `Secs` = '%d' WHERE `Name` = '%e' WHERE `ID` = '%s'", PaccInfo[playerid][Money], PaccInfo[playerid][Level], PaccInfo[playerid][Vip], PaccInfo[playerid][Kills], PaccInfo[playerid][Deaths], PaccInfo[playerid][Hours], PaccInfo[playerid][Mins], PaccInfo[playerid][Secs], PaccInfo[playerid][ID]);//Scriem comanda pentru baza de date
	mysql_tquery(Handle, szQuery, "", "", playerid);
	return 1;
}
forward LoadPlayerData(playerid);
public LoadPlayerData(playerid)
{
    szQuery[0] = EOS;
	/*if(!cache_get_row_count(Handle))
	{
		format(szQuery, 128, "{00FF00}Salut {FF0000}%s{00FF00}nAcest nume este inregistrat.n{FFFF00}Te rugam sa introduci parola.", GetName(playerid));
		ShowPlayerDialog(playerid, L_DIALOG, DIALOG_STYLE_PASSWORD, "Logare", szQuery, "Logare", "Exit");
		return 1;
	}*/
	PaccInfo[playerid][ID] = cache_get_field_content_int(0, "ID", Handle);
	cache_get_field_content(0, "IP", PaccInfo[playerid][IP], Handle, 20);
	cache_get_field_content(0, "Name", PaccInfo[playerid][Name], Handle, 20);
	cache_get_field_content(0, "Password", PaccInfo[playerid][Password], Handle, 20);
	PaccInfo[playerid][Money] = cache_get_field_content_int(0, "Money", Handle);
	PaccInfo[playerid][Level] = cache_get_field_content_int(0, "Level", Handle);
	PaccInfo[playerid][Vip] = cache_get_field_content_int(0, "VIP", Handle);
	PaccInfo[playerid][Kills] = cache_get_field_content_int(0, "Kills", Handle);
	PaccInfo[playerid][Deaths] = cache_get_field_content_int(0, "Deaths", Handle);
	PaccInfo[playerid][Hours] = cache_get_field_content_int(0, "Hours", Handle);
	PaccInfo[playerid][Mins] = cache_get_field_content_int(0, "Mins", Handle);
	PaccInfo[playerid][Secs] = cache_get_field_content_int(0, "Secs", Handle);
	PaccInfo[playerid][LGIN] = 1;
	format(szQuery, 128, "Bine ai revenit %s. Ai fost logat cu succes.", GetName(playerid));
	SendClientMessage(playerid, LIGHTGREEN, szQuery);
	return 1;
}
 
	if(dialogid == R_DIALOG)
	{
	    if(!response) return Kick(playerid);
	    szQuery[0] = EOS;
	    if(strlen(inputtext) < 3)
	    {
	        format(szQuery, 128, "Salut %s, acest nume nu este inregistrat.nTe rugam sa introduci parola.nParola trebuie sa contina minim 3 caractere.", GetName(playerid));
			ShowPlayerDialog(playerid, R_DIALOG, DIALOG_STYLE_PASSWORD, "Inregistrare", szQuery, "Inregistrare", "Exit");
			return 1;
		}
		new PasswordHash[129];
		WP_Hash(PasswordHash, 129, inputtext);
		PaccInfo[playerid][ID] = cache_insert_id(Handle);
		mysql_format(Handle, szQuery, 256, "INSERT INTO `users` (`Name`, `Password`, `IP`, `Money`, `Level`, `VIP`, `Kills`, `Deaths`, `Hours`, `Mins`, `Secs`) VALUES ('%s', '%e', '%e', 0, 0, 0, 0, 0, 0, 0, 0)", GetName(playerid), PasswordHash, GetIP(playerid));
		mysql_tquery(Handle, szQuery, "", "");
		SendClientMessage(playerid, LIGHTBLUE, "Te-ai inregistrat cu succes, ai fost logat automat.");
		PaccInfo[playerid][LGIN] = 1;
	    return 1;
	}

	if(dialogid == L_DIALOG)
	{
	    if(!response) return Kick(playerid);
	   	new PasswordHash[129];
		WP_Hash(PasswordHash, sizeof(PasswordHash), inputtext);
	    mysql_format(Handle, szQuery, 256, "SELECT * FROM `users` WHERE `Name` = '%e' AND `Password` = '%e' LIMIT 1;", GetName(playerid), PasswordHash);
		mysql_tquery(Handle, szQuery, "LoadPlayerData", "d", playerid);
	    return 1;
	} 

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da, si mi-am frecat nervii vreo 5 ore.

Edited by Tarzanus
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
  • 0
  • 0
  • 0
[19:55:21] [WARNING] cache_insert_id - no active cache
[19:55:21] [ERROR] mysql_format - destination size is too small
[19:55:21] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''EAA6AF6BE82D056701F51837DF4DE6D90ED38A08AB3D87AB2AF93212128246FD74C5CDC5395B35D' at line 1

MySQL r38.

Link to comment
Share on other sites

  • 0

Erorile inseamna ca nu are ce sa selecteze.

 

 

[19:55:21] [WARNING] cache_insert_id - no active cache
[19:55:21] [ERROR] mysql_format - destination size is too small
[19:55:21] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''EAA6AF6BE82D056701F51837DF4DE6D90ED38A08AB3D87AB2AF93212128246FD74C5CDC5395B35D' at line 1

MySQL r38.

 

Poti sa ne arati si unde este eroare in script?

 

Trebuie sa marest sirul de caractere.

Link to comment
Share on other sites

  • 0

E o prostie, cu mysql r38 nu imi salveaza cont-ul in db, iar pe r39-2 imi da errori.

 

Pentru ca iti da eroarea de mai jos, de asta nu iti poate crea un cont in baza de date.

 

[19:55:21] [WARNING] cache_insert_id - no active cache
[19:55:21] [ERROR] mysql_format - destination size is too small
[19:55:21] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''EAA6AF6BE82D056701F51837DF4DE6D90ED38A08AB3D87AB2AF93212128246FD74C5CDC5395B35D' at line 1

MySQL r38.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.