SA-MP Forums Archive
number of arguments does not match definition - 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: number of arguments does not match definition (/showthread.php?tid=634906)



number of arguments does not match definition - Fletcher007 - 28.05.2017

Please Help
PHP код:
6961) : warning 202number of arguments does not match definition 
Код:
public OnIncomingConnection(playerid, ip_address[], port) return 1;
publics: Fresh()
{
    gettime(hour, minute, second);
	if(payday != hour)
	{
        payday=hour, PayDay(), curdate = getdate(year, month, day);
		format(format_string,35, "Сейчас времени %d:00 часов.",hour), SendClientMessageToAll(COLOR_LIGHTRED,format_string);
	}



Re: number of arguments does not match definition - DarkBr - 28.05.2017

Код:
public OnIncomingConnection(playerid, ip_address[], port) return 1;
publics: Fresh()
{
    gettime(hour, minute, second);
	if(payday != hour)
	{
        payday=hour, PayDay(), curdate = getdate(year, month, day);
		format(format_string,35, "Сейчас времени %d:00 часов.",hour), 
        SendClientMessageToAll(COLOR_LIGHTRED,format_string);
	}

public OnIncomingConnection(playerid, ip_address[], port)
publics: Fresh()
{
        gettime(hour, minute, second);
	if(payday != hour)
	{
                payday=hour, PayDay(), curdate = getdate(year, month, day);
		format(format_string,35, "Сейчас времени %d:00 часов.",hour), 
                SendClientMessageToAll(COLOR_LIGHTRED,format_string);
	}
        return 1;
}
go test


Re: number of arguments does not match definition - Fletcher007 - 28.05.2017

dont working
same warning


Re: number of arguments does not match definition - Sew_Sumi - 28.05.2017

The reason you're having this happen is due to your forward being different to how the function is being used.

You need to post up the definitions, not just the functions.