[HELP]
#1

i i need help i get errors this are the errors:

pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : fatal error 107: too many error messages on one line
this is the command:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/makeadmin", true) == 0)
{
if (PlayerInfo[playerid][pAdminLevel] == 5 || IsPlayerAdmin(playerid))
    {
    tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /makeadmin [playerid] [level 1-5]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Player will be an admin. **PLEASE ENTER THE ID ONLY!**");
            return 1;
        }
        giveplayerid = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        level = strval(tmp);
        if(giveplayerid != INVALID_PLAYER_ID)
        {
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[giveplayerid][pAdminLevel] = level;
                printf("[ADMIN NEWS]: %s made %s a level %d admin.", sendername, giveplayer, level);
                format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level, sendername);
                SendClientMessage(giveplayerid, LIGHTBLUE, string);
                format(string, sizeof(string), "You have given %s level %d admin.", giveplayer,PlayerInfo[giveplayerid][pAdminLevel]);
                SendClientMessage(playerid, LIGHTBLUE, string);
        }
        else if(giveplayerid != INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
    }
    else
    {
    SendClientMessage(playerid, RED, "You are not a lead admin!");
    }
return 1;
}
it says line 30
this is line 30:

pawn Код:
if(strcmp(cmd, "/makeadmin", true) == 0)
i need help ty alot
Reply
#2

please i need help
Reply
#3

pawn Код:
if (strcmp("/makeadmin", cmdtext, true, 10) == 0)
Reply
#4

Quote:
Originally Posted by Klutty
pawn Код:
if (strcmp("/makeadmin", cmdtext, true, 10) == 0)
pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(32) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(32) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(32) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(32) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(32) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
not working
Reply
#5

show line 31 till 33 now.
Reply
#6

Quote:
Originally Posted by Pandabeer1337
show line 31 till 33 now.
pawn Код:
{
if (PlayerInfo[playerid][pAdminLevel] == 5 || IsPlayerAdmin(playerid))
    {
that is line 31 till 33
Reply
#7

hm.. dont see anything wrong about that
Reply
#8

Quote:
Originally Posted by Pandabeer1337
hm.. dont see anything wrong about that
hmm pawno is ill?
Reply
#9



Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/makeadmin", true) == 0)
{
if (PlayerInfo[playerid][pAdminLevel] == 5 || IsPlayerAdmin(playerid))
	{
	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, ORANGE, "USAGE: /makeadmin [playerid] [level 1-5]");
			SendClientMessage(playerid, ORANGE, "FUNCTION: Player will be an admin. **PLEASE ENTER THE ID ONLY!**");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		level = strval(tmp);
		if(giveplayerid != INVALID_PLAYER_ID)
		{
				GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				GetPlayerName(playerid, sendername, sizeof(sendername));
				PlayerInfo[giveplayerid][pAdminLevel] = level;
				printf("[ADMIN NEWS]: %s made %s a level %d admin.", sendername, giveplayer, level);
				format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level, sendername);
				SendClientMessage(giveplayerid, LIGHTBLUE, string);
				format(string, sizeof(string), "You have given %s level %d admin.", giveplayer,PlayerInfo[giveplayerid][pAdminLevel]);
				SendClientMessage(playerid, LIGHTBLUE, string);
		}
		else if(giveplayerid != INVALID_PLAYER_ID)
		{
			format(string, sizeof(string), "%d is not an active player.", giveplayerid);
			SendClientMessage(playerid, RED, string);
		}
	}
	else
	{
	SendClientMessage(playerid, RED, "You are not a lead admin!");
	}
return 1;
}
Reply
#10

Quote:
Originally Posted by Gamer007

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/makeadmin", true) == 0)
{
if (PlayerInfo[playerid][pAdminLevel] == 5 || IsPlayerAdmin(playerid))
	{
	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, ORANGE, "USAGE: /makeadmin [playerid] [level 1-5]");
			SendClientMessage(playerid, ORANGE, "FUNCTION: Player will be an admin. **PLEASE ENTER THE ID ONLY!**");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		level = strval(tmp);
		if(giveplayerid != INVALID_PLAYER_ID)
		{
				GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				GetPlayerName(playerid, sendername, sizeof(sendername));
				PlayerInfo[giveplayerid][pAdminLevel] = level;
				printf("[ADMIN NEWS]: %s made %s a level %d admin.", sendername, giveplayer, level);
				format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level, sendername);
				SendClientMessage(giveplayerid, LIGHTBLUE, string);
				format(string, sizeof(string), "You have given %s level %d admin.", giveplayer,PlayerInfo[giveplayerid][pAdminLevel]);
				SendClientMessage(playerid, LIGHTBLUE, string);
		}
		else if(giveplayerid != INVALID_PLAYER_ID)
		{
			format(string, sizeof(string), "%d is not an active player.", giveplayerid);
			SendClientMessage(playerid, RED, string);
		}
	}
	else
	{
	SendClientMessage(playerid, RED, "You are not a lead admin!");
	}
return 1;
}
OMGPawno Is ill
pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
of the code of you -.-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)