Some errors
#1

Код:
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.
Using codes:

Код:
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;
}
Reply
#2

pawn Код:
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;
}
Reply
#3

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;
}
errors:
Код:
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.
I ahve to put any "new" or define?
Reply
#4

Quote:
Originally Posted by Tuntun
Посмотреть сообщение
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;
}
errors:
Код:
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.
I ahve to put any "new" or define?
Try

Код:
 if(PlayerInfo[playerid][AdminLevel] >= 3)
to

Код:
if(pInfo[playerid][AdminLevel] >= 3)
Reply
#5

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.
maybe i need any "new " or "define"?
Reply
#6

Quote:
Originally Posted by Tuntun
Посмотреть сообщение
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.
maybe i need any "new " or "define"?
Yes it was not defined, but you don't need to. I was thinking if you just copy that script somewhere and paste it in your fs/gm?

Can you please show the script for cmd:kick or cmd:ban or any admin command?
Reply
#7

Its a ppc gamemode so here is it:
Код:
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;
}
Reply
#8

Код:
 if(PlayerInfo[playerid][AdminLevel] >= 3)
to

Код:
if(APlayerData[playerid][AdminLevel] >= 3)
You are welcome my friend
Reply
#9

pawn Код:
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;
}
Try this out
Reply
#10

Код:
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)