SA-MP Forums Archive
help with this - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with this (/showthread.php?tid=640694)



help with this - NitroZeth - 06.09.2017

Hello i get this error in my IRC Fs

Код:
error 010: invalid function or declaration
C:\Users\donat\Desktop\Archivos 2\BLTTDM\IRC BLTTDM 3E\IRCFS.pwn(904) : error 021: symbol already defined: "GetPlayerName"
C:\Users\donat\Desktop\Archivos 2\BLTTDM\IRC BLTTDM 3E\IRCFS.pwn(906) : error 021: symbol already defined: "MessageToAdmins"
C:\Users\donat\Desktop\Archivos 2\BLTTDM\IRC BLTTDM 3E\IRCFS.pwn(910) : error 017: undefined symbol "ADM_CHAT_LOG"
C:\Users\donat\Desktop\Archivos 2\BLTTDM\IRC BLTTDM 3E\IRCFS.pwn(913) : error 010: invalid function or declaration
code :

Код:
//==============================================================================
// Administration Chat
//==============================================================================
	if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
	{
	    new string[128]; GetPlayerName(playerid,string,sizeof(string));
		format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
		MessageToAdmins(green,string);
		GetPlayerName(playerid,string,sizeof(string));
		format(string,sizeof(string),"9Admin Chat: %s: %s",string,text[1]);
		IRC_GroupSay(gGroupID2, IRC_ADMINCHANNEL, string);
		#if ADM_CHAT_LOG == true
		SaveIn("AdmChatLog",string);
		#endif
	    return 0;
	}
MessageToAdmins is defined but dont work it give error


Re: help with this - NitroZeth - 06.09.2017

pls help


Re: help with this - Puff - 06.09.2017

Please show where you defined those.


Re: help with this - NitroZeth - 06.09.2017

this
Код:
forward MessageToAdmins(color,const string[]);
and this
Код:
public MessageToAdmins(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) == 1)
		if(AccInfo[i][Level] >= 1){
		SendClientMessage(i, color, string); }
	}
	return 1;
}
and this
Код:
PlayerName2(playerid) {
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
return plname;
}



Re: help with this - JasonRiggs - 06.09.2017

Are you sure that MessageToAdmins isn't defined before?

also try changing PlayerName2(playerid) to
PHP код:
stock PlayerName2(playerid
same with MessageToAdmins and remove the forward