4 Errors
#1

Код:
D:\Pilots\gamemodes\SS.pwn(20581) : error 029: invalid expression, assumed zero
D:\Pilots\gamemodes\SS.pwn(20581 -- 20583) : error 029: invalid expression, assumed zero
D:\Pilots\gamemodes\SS.pwn(20583) : error 001: expected token: ";", but found "return"
D:\Pilots\gamemodes\SS.pwn(20583) : fatal error 107: too many error messages on one line

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


4 Errors.
Codes:
Код:
CMD:slap(playerid,params[])
{
    new targetid; new Float:x, Float:y, Float:z;
	if(IsPlayerAdmin(playerid) || if(PInfo[playerid][AdminLevel] >= 1)
    {
	if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_YELLOW,"Usage: /slap [player id]");
	{
	    GetPlayerPos(targetid,x,y,z);
	    SetPlayerPos(targetid,x,y,z+20);
        new PlayerName[MAX_PLAYER_NAME];
		GetPlayerName(targetid,PlayerName,MAX_PLAYER_NAME);
		new string[128];
		format(string,sizeof(string),"You have slapped %s.",PlayerName);
		SendClientMessage(playerid,COLOR_MESSAGE,string);
		SendClientMessage(targetid,COLOR_YELLOW,"You got slapped by someone.");
	}
	}
	else SendClientMessage(playerid,COLOR_YELLOW,notknown);
	return 1;
}
Reply
#2

pawn Код:
CMD:slap(playerid,params[])
{
    new targetid; new Float:x, Float:y, Float:z;
    if(IsPlayerAdmin(playerid) || if(PInfo[playerid][AdminLevel] >= 1);
    {
    if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_YELLOW,"Usage: /slap [player id]");
    {
        GetPlayerPos(targetid,x,y,z);
        SetPlayerPos(targetid,x,y,z+20);
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(targetid,PlayerName,MAX_PLAYER_NAME);
        new string[128];
        format(string,sizeof(string),"You have slapped %s.",PlayerName);
        SendClientMessage(playerid,COLOR_MESSAGE,string);
        SendClientMessage(targetid,COLOR_YELLOW,"You got slapped by someone.");
    }
    }
    else SendClientMessage(playerid,COLOR_YELLOW,notknown);
    return 1;
}
Reply
#3

Код:
error 029: invalid expression, assumed zero
 warning 215: expression has no effect
warning 219: local variable "PlayerName" shadows a variable at a preceding level
 error 029: invalid expression, assumed zero
error 017: undefined symbol "notknown"
 warning 219: local variable "PlayerName" shadows a variable at a preceding level
error 029: invalid expression, assumed zero
: error 029: invalid expression, assumed zero
error 028: invalid subscript (not an array or too many  fatal error 107: too many error messages on one line
Reply
#4

Any help?
Reply
#5

pawn Код:
CMD:slap(playerid,params[])
{
    new targetid; new Float:x, Float:y, Float:z;
    if(IsPlayerAdmin(playerid) || if(PInfo[playerid][AdminLevel] >= 1)
    {
    if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_YELLOW,"Usage: /slap [player id]");
    {
        GetPlayerPos(targetid,x,y,z);
        SetPlayerPos(targetid,x,y,z+20);
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(targetid,PlayerName,MAX_PLAYER_NAME);
        new string[128];
        format(string,sizeof(string),"You have slapped %s.",PlayerName);
        SendClientMessage(playerid,COLOR_MESSAGE,string);
        SendClientMessage(targetid,COLOR_YELLOW,"You got slapped by someone.");
    }
    }
    else return SendClientMessage(playerid,COLOR_YELLOW,notknown);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)