error 035: argument type mismatch (argument 2) Time
#1

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;
	}
Reply
#2

Looks like you forgot to define it's colour.
Reply
#3

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);
Reply
#4

oh! thank you Konstantinos! And [vTc]Patroool
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)