SA-MP Forums Archive
error 035: argument type mismatch (argument 2) Time - 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: error 035: argument type mismatch (argument 2) Time (/showthread.php?tid=505674)



error 035: argument type mismatch (argument 2) Time - Slicebook - 09.04.2014

help!
Код:
error 035: argument type mismatch (argument 2)
Код:
	if(strcmp(cmd, "/time", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
		    new mtext[20];
			new year, month,day;
			getdate(year, month, day);
			if(month == 1) { mtext = "Januar"; }
			else if(month == 2) { mtext = "Februar"; }
			else if(month == 3) { mtext = "Marcius"; }
			else if(month == 4) { mtext = "Aprilis"; }
			else if(month == 5) { mtext = "Majus"; }
			else if(month == 6) { mtext = "Junius"; }
			else if(month == 7) { mtext = "Julius"; }
			else if(month == 8) { mtext = "Augusztus"; }
			else if(month == 9) { mtext = "Szeptember"; }
			else if(month == 10) { mtext = "Oktober"; }
			else if(month == 11) { mtext = "November"; }
			else if(month == 12) { mtext = "December"; }
			new hour,minuite,second;
			gettime(hour,minuite,second);
			ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch", 4.1, 0, 0, 0, 0, -1);
			if (minuite < 10)
			{
				SendClientMessage(playerid,"Pontos idő: %s-%d-%d-%d",mtext, day, hour, minuite); <<ERROR
			}	
			GameTextForPlayer(playerid, string, 5000, 1);
			format(string, sizeof(string), "* Valaki megnйzte az уrбjбt.");
			ProxDetector(30.0, playerid,string , COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			SetPlayerChatBubble(playerid, "* Valaki megnйzte az уrбjбt.", COLOR_PURPLE, 5, 4000);
		}
		return 1;
	}



Re: error 035: argument type mismatch (argument 2) Time - Bingo - 09.04.2014

Looks like you forgot to define it's colour.


Re: error 035: argument type mismatch (argument 2) Time - Konstantinos - 09.04.2014

SendClientMessage has color as 2nd parameter. Also using placeholders directly will crash your server. Use format first.

pawn Код:
new msg[40];
format(msg, sizeof (msg), "Pontos idő: %s-%d-%d-%d", mtext, day, hour, minuite);
SendClientMessage(playerid, -1, msg);



Re: error 035: argument type mismatch (argument 2) Time - Slicebook - 09.04.2014

oh! thank you Konstantinos! And [vTc]Patroool