error 010: invalid function or declaration - Need some help :(
#1

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,
Reply
#2

Meh. What line?
Reply
#3

Stop using the NGRP script.
Reply
#4

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
Reply
#5

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)