SA-MP Forums Archive
error 010: invalid function or declaration - Need some help :( - 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 010: invalid function or declaration - Need some help :( (/showthread.php?tid=333518)



error 010: invalid function or declaration - Need some help :( - Oscii - 11.04.2012

Quote:

[20:49:59] invalid function or declaration

Pawn Code:
Код:
CMD:warn(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
	if (PlayerInfo[playerid][pAdmin] >= 1)
	{
		new string[128], giveplayerid, reason[64];
		if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /warn [playerid] [reason]");

		if(IsPlayerConnected(giveplayerid))
		{
			if(PlayerInfo[giveplayerid][pAdmin] >= 1)
			{
				SendClientMessageEx(playerid, COLOR_GRAD2, "Admins can not be warned !");
				return 1;
			}
			new year, month, day;
			getdate(year, month, day);
			format(string, sizeof(string), "AdmCmd: %s was warned by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
			SendClientMessageToAll(COLOR_RED, string, 2);
			format(string, sizeof(string), "AdmCmd: %s was warned by %s, reason: %s (%d-%d-%d)", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason,month, day, year);
			Log("logs/admin.log", string);
			format(string, sizeof(string), "You were warned by %s, reason: %s", GetPlayerNameEx(playerid), reason);
			SendClientMessageEx(giveplayerid, COLOR_LIGHTRED, string);
			return 1;

		}
	}
	else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
	return 1;
}


I just cant fix it,



Re: error 010: invalid function or declaration - Need some help :( - DBan - 11.04.2012

Meh. What line?


Re: error 010: invalid function or declaration - Need some help :( - ReneG - 11.04.2012

Stop using the NGRP script.


Re: error 010: invalid function or declaration - Need some help :( - Oscii - 12.04.2012

O_o i just wanted to use this cmd because im finding it hard to add it to myne.


And this one

SendClientMessageToAll(COLOR_RED, string, 2); <-- i dont know what is wrong with it


Re: error 010: invalid function or declaration - Need some help :( - The__ - 12.04.2012

Quote:
Originally Posted by Oscii
Посмотреть сообщение
O_o i just wanted to use this cmd because im finding it hard to add it to myne.


And this one

SendClientMessageToAll(COLOR_RED, string, 2); <-- i dont know what is wrong with it
pawn Код:
SendClientMessageToAll(COLOR_RED, string);
No such parameter at end of that function...