SA-MP Forums Archive
Sql line not updating. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sql line not updating. (/showthread.php?tid=532501)



Sql line not updating. - devil shill - 18.08.2014

Hey guys got some problem with the sql line that its not updating.

Код:
CMD:sethangar(playerid, params[])//441
{
    if(IsPlayerConnected(playerid))
    {
		new para2, sql[128], level2, str2[128];
		if(sscanf(params, "ud", para2, level2)) return SCM(playerid, COLOR_GREY, "USAGE:/sethangar [playerid] [0=no 1=yes]");
		if (PlayerInfo[playerid][pAdmin] >= 1337)
		{
		    if(IsPlayerConnected(para2))
		    {
		        if(para2 != INVALID_PLAYER_ID)
		        {
		            PlayerInfo[para2][pHashangar] = level2;
     				format(str2,sizeof(str2),"You have set the his/her hangar to %d",PlayerInfo[para2][pHashangar]);
        			SendClientMessage(playerid, COLOR_WHITE,str2);
   					format(sql, sizeof(sql), "UPDATE `samp_users` SET `Hashangar` = %d WHERE `PlayerID`= %d",PlayerInfo[para2][pHashangar],PlayerInfo[para2][pDBID]);
					mysql_query(sql,THREAD_UPDATE,para2);
					return 1;
				}
			}
		}
		else
		{
			SCM(playerid, COLOR_GREY, "You are not authorized to use this command !");
			return 1;
		}
	}
	return 1;
}



Re: Sql line not updating. - Guest4390857394857 - 18.08.2014

You mean the query is not sent to DATABASE m8?


Re: Sql line not updating. - devil shill - 18.08.2014

Quote:
Originally Posted by ShivRp
Посмотреть сообщение
You mean the query is not sent to DATABASE m8?
Not updating in the database, Checked the logs but no errors can be found.