#1

it give me Errors
Код:
C:\Users\pawno\include\PPC_PlayerCommands.inc(1584) : error 017: undefined symbol "string"
C:\Users\pawno\include\PPC_PlayerCommands.inc(1584) : error 017: undefined symbol "string"
C:\Users\pawno\include\PPC_PlayerCommands.inc(1584) : error 029: invalid expression, assumed zero
C:\Users\pawno\include\PPC_PlayerCommands.inc(1584) : fatal error 107: too many error messages on one line

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


4 Errors.
Код:
// Bans a player for (days, hours, minutes, seconds)
COMMAND:ban(playerid, params[])
{
	// Setup local variables
	new PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24];

	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/ban", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player's admin-level is at least 3
		if (APlayerData[playerid][PlayerLevel] >= 3)
		{
			if (sscanf(params, "uiis[128]", PlayerToBan, Days, Hours, Reason))
				SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <PlayerToBan> <Days> <Hours> <Reason>\"");
			else
			{
				if (IsPlayerConnected(PlayerToBan))
				{
					// Get the names of the player and the admin who executed the ban
					GetPlayerName(playerid, AdminName, sizeof(AdminName));
					GetPlayerName(PlayerToBan, Name, sizeof(Name));

					// Increase the number of bans
					APlayerData[PlayerToBan][Bans]++;
					// Calculate the total bantime (when the player can login again)
					TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime();
					// Check if this is the player's 5th ban
					if (APlayerData[PlayerToBan][Bans] == 5)
						APlayerData[PlayerToBan][BanTime] = 2147483640; // Make the ban permanent (as high as it can go)
					else
						APlayerData[PlayerToBan][BanTime] = TotalBanTime; // Store this value for the player

					// Inform the player about his ban
					// Check if this is the player's 5th ban
					if (APlayerData[PlayerToBan][Bans] == 5)
					{
						format(Msg, 128, "You have been banned permanently by %s, this was your 5th ban", AdminName);
						SendClientMessage(PlayerToBan, 0x808080FF, Msg);
					}
					else
					{
						format(Msg, 128, "You have been banned by %s for %i days and %i hours", AdminName, Days, Hours);
						SendClientMessage(PlayerToBan, 0xFF0000AA, Msg);
						format(Msg, 128, "Reason: %s", Reason);
						SendClientMessage(PlayerToBan, 0xFF0000AA, Msg);
						format(Msg, 128, "You've been banned %i times now, 5th time is permament", APlayerData[PlayerToBan][Bans]);
						SendClientMessage(PlayerToBan, 0xFF0000AA, Msg);
					}

					// Kick the player (his data will be saved)
					format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has been banned by Admin %s for: %s",d,m,y,h,mi,s,giveplayer,sendername, (result));
					BanLog(string);
					new y, m, d;
					new h,mi,s;
					Kick(PlayerToBan);

					// Inform everybody else which player was banned and for how long
                    format(Msg, 128, "%s %s has banned %s for %i days and %i hours", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours);
					SendClientMessageToAll(0xAA3333AA, Msg);
				}
			}
		}
		else
		    return 0;
	}
	else
	    return 0;

	return 1;
}
Reply
#2

Simply define the string.
pawn Код:
new string[128];
Reply
#3

Ok.i'm going to try.
Reply
#4

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
Код:
Sorry for the command dis one



C:\Users\pawno\include\PPC_PlayerCommands.inc(5198) : error 017: undefined symbol "tmp"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5198) : error 017: undefined symbol "cmdtext"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5199) : error 017: undefined symbol "tmp"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5205) : error 017: undefined symbol "giveplayerid"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5205) : error 017: undefined symbol "ReturnUser"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5207) : error 017: undefined symbol "giveplayerid"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5209) : error 017: undefined symbol "giveplayerid"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5211) : error 017: undefined symbol "giveplayerid"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5211) : error 017: undefined symbol "giveplayer"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5211) : error 029: invalid expression, assumed zero
C:\Users\pawno\include\PPC_PlayerCommands.inc(5211) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
You have to define all of those undefined variables.
Reply
#5

Help

it don't show dis

Код:
					format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has been banned by %s for: %s",d,m,y,h,mi,s,giveplayer,sendername, (result));
					BanLog(string);
Its say dis


Код:
 Has been banned by  for:
Reply
#6

As I said before..
pawn Код:
new string[128];
Reply
#7

Nvm it working Ty for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)