Проблема с mysql
#1

Код:
[Wed Jul 10 21:03:20 2013] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[Wed Jul 10 21:03:20 2013] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
Код:
	    mysql_query("SELECT `Name`, `Leader`, `LastVisit` FROM `"UsersTable"` WHERE `Leader` > 0 ORDER BY `Leader` ASC LIMIT 45", 1, playerid);
Код:
public OnMysqlQuery(resultid, spareid, MySQL:handle)
{
	switch(resultid)
	{
	    case 1:
	    {
	        globalstr = "";
	        mysql_store_result();

	        if(mysql_num_rows())
        	{
        	    new Query[100];
        	    new leader[5];
        	    new name[25];
        	    new last_visit[20];
        	    new ttext[20];

	            for(new id; mysql_fetch_row(Query, "|"); id++)
	            {
	                mysql_fetch_field("Name", name);
	                mysql_fetch_field("Leader", leader);
	                mysql_fetch_field("LastVisit", last_visit);

					switch(strval(leader))
					{
						case 1: ttext = "Полицейский";
						case 2: ttext = "Агент FBI";
						case 3: ttext = "Военный";
						case 4: ttext = "Медик";
						case 5: ttext = "LCN";
						case 6: ttext = "Yakuza";
						case 7: ttext = "Член Мэрии";
						case 8: ttext = "Hitman";
						case 9: ttext = "Репортёр";
						case 10: ttext = "Байкер";
						case 11: ttext = "Лицензиар";
						case 12: ttext = "Русская Мафия";
					    case 13: ttext = "The Ballas Gang";
					    case 14: ttext = "Grove Street";
						case 15: ttext = "LS Vagos";
					   	case 16: ttext = "El Coronos";
					    case 17: ttext = "The Rifa Gang";
					    case 18: ttext = "Колхоз";
					}

					format(globalstr, sizeof(globalstr), "%s[%d] %s | %s | %s\n", globalstr, id, name, ttext, last_visit);

					if((strlen(globalstr)+80) >= sizeof(globalstr)) break;
	            }

	        }

			ShowPlayerDialog(spareid, 999, DIALOG_STYLE_MSGBOX, "[#] Ник | Фракция | Был в игре", globalstr, "Ок", "");

	        mysql_free_result();
	        globalstr = "";
	    }
	}

	return 1;
}
Reply
#2

А ты пробовал переводить то что он тебе пишет?
И какая версия плагина?
Reply
#3

Quote:
Originally Posted by Stepashka
Посмотреть сообщение
А ты пробовал переводить то что он тебе пишет?
И какая версия плагина?
там походу смысл тот, что этот запрос не выполнился, и уже начал выполняться другой
https://sampforum.blast.hk/showthread.php?tid=122983 - последняя версия
Reply
#4

Никто не знает что ли?
Reply
#5

подниму.
с R7 - R8 по крайней мере такой проблемы никто не встречал? там вроде как буфером плагин управляет уже
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)