E:\this\18WoS\gamemodes\18WoS.pwn(1470) : error 037: invalid string (possibly non-terminated string) E:\this\18WoS\gamemodes\18WoS.pwn(1470) : error 017: undefined symbol "Server" E:\this\18WoS\gamemodes\18WoS.pwn(1470) : error 017: undefined symbol "Creator" E:\this\18WoS\gamemodes\18WoS.pwn(1470) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
CMD:credits(playerid,params[])
{
SendClientMessage(playerid,MATI_COLOR,".:Server Credits:.");
SendClientMessage(playerid,-1,"Server Owner/Hoster: Tuntun");
SendClientMessage(playerid,-1,"Server Mapper: Tuntun");
SendClientMessage(playerid,-1,"Server Creator/Editor: Tuntun);
SendClientMessage(playerid,COLOR_MATI,".:Thanks for reading our server credits:.);
return 1;
}
CMD:credits(playerid,params[])
{
SendClientMessage(playerid,MATI_COLOR,".:Server Credits:.");
SendClientMessage(playerid,-1,"Server Owner/Hoster: Tuntun");
SendClientMessage(playerid,-1,"Server Mapper: Tuntun");
SendClientMessage(playerid,-1,"Server Creator/Editor: Tuntun");
SendClientMessage(playerid,COLOR_MATI,".:Thanks for reading our server credits:.");
return 1;
}
CMD:annc(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
new msg[200];
if (sscanf(params, "s[200]", msg)) return SendClientMessage(playerid, COLOR_RED, "Usage: /annc [message/announce]");
if (IsPlayerConnected(playerid))
{
GameTextForAll(msg, 5000, 5);
SendCommandToAdmins(playerid,"/annc");
}
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast admin level 3 to use this command");
return 1;
}
E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 017: undefined symbol "PlayerInfo" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : warning 215: expression has no effect E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 001: expected token: ";", but found "]" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 029: invalid expression, assumed zero E:\this\18WoS\gamemodes\18WoS.pwn(1476) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
|
Okey thanks and now one more help.
Код:
CMD:annc(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
new msg[200];
if (sscanf(params, "s[200]", msg)) return SendClientMessage(playerid, COLOR_RED, "Usage: /annc [message/announce]");
if (IsPlayerConnected(playerid))
{
GameTextForAll(msg, 5000, 5);
SendCommandToAdmins(playerid,"/annc");
}
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast admin level 3 to use this command");
return 1;
}
Код:
E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 017: undefined symbol "PlayerInfo" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : warning 215: expression has no effect E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 001: expected token: ";", but found "]" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 029: invalid expression, assumed zero E:\this\18WoS\gamemodes\18WoS.pwn(1476) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
if(PlayerInfo[playerid][AdminLevel] >= 3)
if(pInfo[playerid][AdminLevel] >= 3)
E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 017: undefined symbol "pInfo" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : warning 215: expression has no effect E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 001: expected token: ";", but found "]" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 029: invalid expression, assumed zero E:\this\18WoS\gamemodes\18WoS.pwn(1476) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
|
Still this:
Код:
E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 017: undefined symbol "pInfo" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : warning 215: expression has no effect E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 001: expected token: ";", but found "]" E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 029: invalid expression, assumed zero E:\this\18WoS\gamemodes\18WoS.pwn(1476) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |

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, 0x808080FF, Msg);
format(Msg, 128, "Reason: %s", Reason);
SendClientMessage(PlayerToBan, 0x808080FF, Msg);
format(Msg, 128, "You've been banned %i times now, 5th time is permament", APlayerData[PlayerToBan][Bans]);
SendClientMessage(PlayerToBan, 0x808080FF, Msg);
}
// Kick the player (his data will be saved)
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(0x808080FF, Msg);
}
}
}
else
return 0;
}
else
return 0;
return 1;
}
if(PlayerInfo[playerid][AdminLevel] >= 3)
if(APlayerData[playerid][AdminLevel] >= 3)
CMD:annc(playerid, params[])
{
if(APlayerData[playerid][AdminLevel] >= 3)
{
new msg[200];
if (sscanf(params, "s[200]", msg)) return SendClientMessage(playerid, COLOR_RED, "Usage: /annc [message/announce]");
if (IsPlayerConnected(playerid))
{
GameTextForAll(msg, 5000, 5);
SendCommandToAdmins(playerid,"/annc");
}
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast admin level 3 to use this command");
return 1;
}
CMD:ann(playerid, params[])
{
if(APlayerData[playerid][AdminLevel] >= 3)
{
new msg[200];
if (sscanf(params, "s[200]", msg)) return SendClientMessage(playerid, COLOR_MATI, "Usage: /annc [message/announce]");
if (IsPlayerConnected(playerid))
{
GameTextForAll(msg, 5000, 5);
}
}
else return SendClientMessage(playerid, COLOR_MATI, "ERROR: you need to be atleast admin level 3 to use this command");
return 1;
}
E:\this\18WoS\gamemodes\18WoS.pwn(1476) : error 017: undefined symbol "AdminLevel" E:\this\18WoS\gamemodes\18WoS.pwn(1479) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.