Need help.
#1

Hello.


I've been compiling my script and it gave me one error. So the script it's down and the error below from it. !

Код:
CMD:nfweaps(playerid,params[]) {
	if(PlayerInfo[playerid][NFLevel] >= 1) {
        SendClientMessage(playerid, red, "{5EFF00}Enjoy NF Weaps");
        CMDMessageToNF(playerid,"NFWEAPS");
		GivePlayerWeapon(playerid,28,1000); GivePlayerWeapon(playerid,31,1000);
		GivePlayerWeapon(playerid,34,1000);
		GivePlayerWeapon(playerid,16,1000);
		GivePlayerWeapon(playerid,14,1000); GivePlayerWeapon(playerid,9,1);
		GivePlayerWeapon(playerid,24,1000); GivePlayerWeapon(playerid,26,1000); return 1;
		new string[128]; format(string,sizeof(string),"{FF0000}[INFO]:{00C7FF} %s used the command /nfweaps {FF0000}/nfweaps", pName );
		SendClientMessageToAll(COLOR_RED, string);
	} else return SendClientMessage(playerid,red,"ERROR: You need to be NF Member to use this command");
}
The ERROR:

Код:
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM[3.7].pwn(8622) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Thank you, if you can help me fixing the error!

Ah, forgot the 8622 Line!

Код:
new string[128]; format(string,sizeof(string),"{FF0000}[INFO]:{00C7FF} %s used the command /nfweaps {FF0000}/nfweaps", pName );
Reply
#2

Do you have stock pName?
Reply
#3

// Put this after The last line

Quote:

stock pName( playerid )
{
new name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, name, sizeof name );
return name;
}

if u already have it show me line 8620 - 8621
Reply
#4

Quote:
Originally Posted by Yaa
Посмотреть сообщение
// Put this after The last line



if u already have it show me line 8620 - 8621
I have the pName stock Here:


Код:
stock pName(playerid)
{
  new plname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, plname, sizeof(plname));
  return plname;
}
Now the 8620 - 8621 Lines that you need.

Код:
GivePlayerWeapon(playerid,14,1000); GivePlayerWeapon(playerid,9,1);
GivePlayerWeapon(playerid,24,1000); GivePlayerWeapon(playerid,26,1000); return 1;
Thats the 8620 - 21 Line.
Reply
#5

Код:
CMD:nfweaps(playerid,params[]) {
	if(PlayerInfo[playerid][NFLevel] >= 1) {
        SendClientMessage(playerid, red, "{5EFF00}Enjoy NF Weaps");
        CMDMessageToNF(playerid,"NFWEAPS");
		GivePlayerWeapon(playerid,28,1000); GivePlayerWeapon(playerid,31,1000);
		GivePlayerWeapon(playerid,34,1000);
		GivePlayerWeapon(playerid,16,1000);
		GivePlayerWeapon(playerid,14,1000); GivePlayerWeapon(playerid,9,1);
		GivePlayerWeapon(playerid,24,1000); GivePlayerWeapon(playerid,26,1000); 
		new string[128]; format(string,sizeof(string),"{FF0000}[INFO]:{00C7FF} %s used the command \nfweaps {FF0000}\nfweaps", pName );
		SendClientMessageToAll(COLOR_RED, string);
                return 1;
	} else return SendClientMessage(playerid,red,"ERROR: You need to be NF Member to use this command");
}
Dont return before a function body or its condition is ended.
new line escape character is \n not /n
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)