/adminduty command help
#1

Hi,

I have funny error and i cant understand it. Maybe you could help me out. Take a look:

Код:
CMD:adminduty(playerid, params[])
{
		if(IsPlayerConnected(playerid))
		{
		    if(gPlayerLogged[playerid] == 0)
		    {
		        SendClientMessage(playerid, COLOR_WHITE, "   Logi sisse ennem !");
				return 1;
		    }
		    if(PlayerData[playerid][AdminLevel] < 1) return SendUnathorizedMessage(playerid);
		    {
		        if(AdminDuty[playerid] == 0)
		        {
		            AdminDuty[playerid] = 1;
		            SetPlayerArmour(playerid, 999);
					SetPlayerHealth(playerid, 999);
					SetPlayerColor(playerid,COLOR_ORANGE);
					//GetPlayerName(playerid, sendername, sizeof(sendername));
					//format(string, sizeof(string), "AdminHoiatus: [ID:%d]%s lьlitas AOD sisse.", playerid, sendername);
					//ABroadCast(COLOR_YELLOW,string,1);
					SendClientMessage(playerid, COLOR_WHITE, "Sa lьlitasid AOD sisse.");
				}
		        else if(AdminDuty[playerid] == 1)
		        {
		            AdminDuty[playerid] = 0;
		            SetPlayerArmour(playerid, 0);
					SetPlayerHealth(playerid, 100);
					SetPlayerColor(playerid,TEAM_HIT_COLOR);
					GetPlayerName(playerid, sendername, sizeof(sendername));
					//format(string, sizeof(string), "AdminHoiatus: [ID:%d]%s lьlitab AOD vдlja.", playerid, sendername);
					//ABroadCast(COLOR_YELLOW,string,1);
					SendClientMessage(playerid, COLOR_WHITE, "Sa lьlitasid AOD vдlja.");
		return 1;
}
CMD:kick(playerid, params[]) <-- Error Line, but i dont get it what's wrong there.
{
	if(PlayerData[playerid][AdminLevel] < 1) return SendUnathorizedMessage(playerid);

	new target, reason[129], string[256];
	if(sscanf(params, "us[129]", target, reason)) return SendClientMessage(playerid, COLOR_SEABLUE, "Syntax:{FFFFFF} /kick [Player ID/Part of name] [Reason]");

	if(IsPlayerConnected(target)) {
	    if(!gIsPlayerLoggedIn[target]) return SendPlayerNotLoggedInMessage(playerid);
	    if(PlayerData[target][AdminLevel] > PlayerData[playerid][AdminLevel])
	    {
	        format(string, sizeof(string), "Admin:{FFFFFF} %s has been auto-kicked for attempting to kick %s.", GetPlayersName(target), GetPlayersName(playerid));
	        SendClientMessageToAll(COLOR_PALERED, string);
	        KickEx(playerid);
	        return 1;
	    }
	    format(string, sizeof(string), "Admin:{FFFFFF} %s has just kicked %s from the server, reason: %s.", GetPlayersName(playerid), GetPlayersName(target), reason);
	    SendClientMessageToAll(COLOR_PALERED, string);
	    KickEx(target);
	    return 1;
	}
	else
	{
	    SendPlayerNotConnectedMessage(playerid);
	}
	return 1;
}
Errors

Код:
F:\Users\Kasutaja\Desktop\MySQL SA-MP server\gamemodes\fortcarson.pwn(1176) : warning 217: loose indentation
F:\Users\Kasutaja\Desktop\MySQL SA-MP server\gamemodes\fortcarson.pwn(1178) : warning 217: loose indentation
F:\Users\Kasutaja\Desktop\MySQL SA-MP server\gamemodes\fortcarson.pwn(1178) : error 017: undefined symbol "@yC_kick"
F:\Users\Kasutaja\Desktop\MySQL SA-MP server\gamemodes\fortcarson.pwn(1178) : error 017: undefined symbol "@yC_kick"
F:\Users\Kasutaja\Desktop\MySQL SA-MP server\gamemodes\fortcarson.pwn(1178) : error 017: undefined symbol "i"
F:\Users\Kasutaja\Desktop\MySQL SA-MP server\gamemodes\fortcarson.pwn(1178) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

show the line
Reply
#3

CMD:kick(playerid, params[]) <-- Error Line, but i dont get it what's wrong there.
Reply
#4

Have you included zcmd in your script ?
Reply
#5

did u used #include <zcmd>?/show ur enum
Reply
#6

Quote:
Originally Posted by Opah
Посмотреть сообщение
Have you included zcmd in your script ?
Nope, but if i added this include same error's.
SHE790 what do you mean enum? Sorry newbie. :P
Reply
#7

This called Enum
Quote:

enum pData
{
pPassword,
pAdmin,
pMoney,
pScore,
pMute,
pFrozen,
pSpecating,
pSkin,
pWarn,
pSpam,
pDuty,
VIP,
}
new P_Data[MAX_PLAYERS][pData];

Reply
#8

Quote:
Originally Posted by SHE790
Посмотреть сообщение
This called Enum
It's kinda a messy because i copied this from other gamemode. Does it effect some how?
Код:
enum pData {
	Fullname[126],
	Password[129],
	Float:PositionX,
	Float:PositionY,
	Float:PositionZ,
	Float:PositionA,
	Float:Health,
	Float:Armour,
	Interior,
	VirtualWorld,
	AdminLevel,
	AdminKey,
	Banned,
	BanReason[126],
	BannedBy[126],
	Warnings,
	Warning1Reason[126],
	Warning2Reason[126],
	Warning3Reason[126],
	WarnedBy1[126],
	WarnedBy2[126],
	WarnedBy3[126],
	Dead,
	HospitalTime
};
new PlayerData[MAX_PLAYERS][pData];
Reply
#9

do u have @yC_kick ? becouse it says u didnt defined this symbol

Note:I'm not sure
Reply
#10

Nope, i can't find anywhere " @yC_kick "
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)