small help
#1

Код:
D:\My server\gamemodes\TDM_Script.pwn(1414) : error 001: expected token: ";", but found "-identifier-"
D:\My server\gamemodes\TDM_Script.pwn(1416) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
1414 - SendClientMessage(playerid, COLOR_WHITE, "You have been died(suicides)");
}
1416 - return 1;
}
Reply
#2

Show us the code surrounding this (eg: command, stock, etc)
Reply
#3

Код:
 CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0)

SendClientMessage(playerid, COLOR_WHITE, "You have been died(suicides)");
}
return 1;
}
Reply
#4

PHP код:
CMD:kill(playeridparams[])
{
    
SetPlayerHealth(playerid0);
    
SendClientMessage(playeridCOLOR_WHITE"You have been died(suicides)");
    return 
1;

Reply
#5

Remove the last bracket "}"
Add "return 1; under sendclientmessage
Born was fast xD
Reply
#6

Thanks
Reply
#7

Another small help i worked on freeze and i got a line have a lot of errors

I will send the full code

Код:
CMD:freeze(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 5);
    {
	        new Target;
	        if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /freeze [playerid]");
	        if(!IsPlayerConnected(Target))
                return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
	        if(!sscanf(params, "u", Target))
		    {
		       if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: Cant perform this command on yourself!" );
                if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!"); 
                new tname[MAX_PLAYER_NAME]; 
				GetPlayerName(Target,tname,sizeof(tname));
				new pname[MAX_PLAYER_NAME];
				GetPlayerName(playerid,pname,sizeof(pname));
				new tstring[128];
				new pstring[128];
				new astring[128];
				format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname); 
				format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target);
				format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname); 
				SendClientMessage(Target,COLOR_GOLD,tstring);
				SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);
				SendClientMessageToAll(COLOR_LIGHTBLUE,astring);
				TogglePlayerControllable(Target,0); 
				PlayerInfo[Target][Frozen] = 1;
            }

	}
	else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 5 to use this command!");
    return 1;
}
Error code
Код:
D:\My server\gamemodes\TDM_Script.pwn(1439) : error 001: expected token: ")", but found "["
D:\My server\gamemodes\TDM_Script.pwn(1439) : error 029: invalid expression, assumed zero
D:\My server\gamemodes\TDM_Script.pwn(1439) : warning 215: expression has no effect
D:\My server\gamemodes\TDM_Script.pwn(1439) : error 001: expected token: ";", but found "]"
D:\My server\gamemodes\TDM_Script.pwn(1439) : fatal error 107: too many error messages on one line

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


4 Errors.
The Line that have the errors

Код:
if(PlayerInfo[playerid][pAdmin] >= 5);
Reply
#8

Quote:
Originally Posted by KamalBa
Посмотреть сообщение
Код:
if(PlayerInfo[playerid][pAdmin] >= 5);
Look at this...

write it like this:

Код:
if(PlayerInfo[playerid][pAdmin] >= 5)
You don't use an ; in an if condition...
Reply
#9

same!

Nothing changed!
Reply
#10

Send me your TeamViewer Data per PM...then i can look over your code...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)