Error's
#1

how i can solve this ?

Код HTML:
[14:31:17 09/16/16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') (Query: "SELECT `ID`, `CRank` FROM `players` WHERE `Name` = 'StR_Marian.STAF'")
[14:31:17 09/16/16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') (Query: "SELECT `ID`, `CRank` FROM `players` WHERE `Name` = 'StR_Marian.STAF'")
[00:00:00 09/18/16] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'Admin' in 'where clause' (Query: "UPDATE `players` SET `StaffPoints`= 0 WHERE `Admin` + `Helper` > 0")
some ideas?
Reply
#2

1 + 2: The query "SELECT `ID`, `CRank` FROM `players` WHERE `Name` = 'StR_Marian.STAF'" is returning no rows, this means that there is something wrong with your syntax, possibly no account found with the name "StR_Marian.STAF".
3. There is no column named "Admin" In your table.
Reply
#3

i have only this things with `CRank`

Код HTML:
if(dialogid == DIALOG_CMEMBERS)
	{
		if(!response) return 1;
		if(PlayerInfo[playerid][pCLeader] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Trebuie sa fii lider ca sa accesezi panoul de control!");
		if(response)
		{
		    format(PlayerInfo[playerid][pSelected], MAX_PLAYER_NAME, "%s",Selected[listitem][snume]);
		    new giveplayerid = GetPlayerID( PlayerInfo[playerid][pSelected] );

		    if(giveplayerid != INVALID_PLAYER_ID)
			{
			    if(PlayerInfo[giveplayerid][pCRank] == 7)
				{
				    SendClientMessage(playerid, COLOR_ERROR, "Membrul selectat este liderul acestui clan, nu poti efectua modificari asupra lui!");
				    return 1;
				}
			}
			else
			{
			    gQuery[0] = (EOS);
				mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `CRank` FROM `players` WHERE `Name` = '%e'", PlayerInfo[playerid][pSelected]);
				new Cache:result = mysql_query(handle, gQuery);
				new tmp[25], test;
				cache_get_field_content(0, "CRank", tmp), test = strval(tmp);
				cache_delete(result);

				if(test == 7)
				{
				    SendClientMessage(playerid, COLOR_ERROR, "Membrul selectat este liderul acestui clan, nu poti efectua modificari asupra lui!");
				    return 1;
				}
			}
            new strings[128];
		    format(strings, sizeof(strings), "{FFFFFF}Administrare membru de clan - %s", PlayerInfo[playerid][pSelected]);
		    ShowPlayerDialog(playerid, DIALOG_CMEMBERS1, DIALOG_STYLE_LIST, strings, "Schimba rank-ul\nUninvite", "Alege", "Iesi");
		}
	}
and this

Код HTML:
gQuery[0] = (EOS);
					mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `ID`, `CRank` FROM `players` WHERE `Name` = '%e'", PlayerInfo[playerid][pSelected]);
					new Cache:result = mysql_query(handle, gQuery);
					new tmp[25], test, test2;

					cache_get_field_content(0, "ID", tmp), test = strval(tmp);
					cache_get_field_content(0, "CRank", tmp), test2 = strval(tmp);
					cache_delete(result);

                    gQuery[0] = (EOS);
    	            mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `players` SET `CRank` = '%d' WHERE `Name` = '%e' ", rank, PlayerInfo[playerid][pSelected]);
    	            mysql_tquery(handle, gQuery, "", "");

		            if(rank >= test2)
		            {
                        format(gString, sizeof(gString), "You promoted %s to rank %d.",PlayerInfo[playerid][pSelected], rank);
					    SendClientMessage(playerid, COLOR_SYN2, gString);

					    format(gString, sizeof(gString), "© {FFFFFF}%s (neconectat) a fost promovat la rank %d de liderul %s.",PlayerInfo[playerid][pSelected], rank, GetName(playerid));
					    SendClanMessage(PlayerInfo[playerid][pCLeader], COLOR_SYN, gString);

		                format(gString, sizeof(gString), "Ai fost promovat la rank %d in clan.", rank);
   				        SendPlayerMail(GetSQLID(playerid), test , gString);
		            }
		            else
		            {
                        format(gString, sizeof(gString), "You demoted %s to rank %d.",PlayerInfo[playerid][pSelected], rank);
					    SendClientMessage(playerid, COLOR_SYN2, gString);

					    format(gString, sizeof(gString), "© {FFFFFF}%s (neconectat) a fost retrogradat la rank %d de liderul %s.",PlayerInfo[playerid][pSelected], rank, GetName(playerid));
					    SendClanMessage(PlayerInfo[playerid][pCLeader], COLOR_SYN, gString);

		                format(gString, sizeof(gString), "Ai fost retrogradat la rank %d in clan.", rank);
   				        SendPlayerMail(GetSQLID(playerid), test , gString);
					}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)