SA-MP Forums Archive
[Ajuda] error 021: symbol already defined: "SendClientMessage" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] error 021: symbol already defined: "SendClientMessage" (/showthread.php?tid=602260)



error 021: symbol already defined: "SendClientMessage" - Misael - 04.03.2016

linha do codigo.

Quote:

SendClientMessage(playerid,-1, "Vocк nгo tem permissгo!");

procurei o erro mas nгo achei.


Re: error 021: symbol already defined: "SendClientMessage" - Dayvison_ - 04.03.2016

Bracket(Chave {) aberto e nгo fechado.


Re: error 021: symbol already defined: "SendClientMessage" - Misael - 04.03.2016

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tartaruga", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,-1, "vocк adcionou a tartaruga em sua cabeзa");
if(aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1)
#else
SendClientMessage(playerid,-1, "Vocк nгo tem permissгo!");
#endif

tem como explicar?


Re: error 021: symbol already defined: "SendClientMessage" - WooPz - 04.03.2016

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tartaruga", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,-1, "vocк adcionou a tartaruga em sua cabeзa");
if(aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1)
SendClientMessage(playerid,-1, "Vocк nгo tem permissгo!");
}
return 1;
}



Re: error 021: symbol already defined: "SendClientMessage" - Monotox - 04.03.2016

Quote:
Originally Posted by Misael
Посмотреть сообщение
tem como explicar?
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/tartaruga", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid,-1, "vocк adcionou a tartaruga em sua cabeзa");
		if(aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1)
		#else
		SendClientMessage(playerid,-1, "Vocк nгo tem permissгo!");
		#endif
Cada chave й um bracket. Neste cуdigo vocк vк que foram abertos e nгo foram fechados. Portanto, ficaria da seguinte forma:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/tartaruga", cmdtext, true, 10) == 0)
	{
		
		SendClientMessage(playerid,-1, "vocк adcionou a tartaruga em sua cabeзa");
		if(aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1)
		#else
		SendClientMessage(playerid,-1, "Vocк nгo tem permissгo!");
		#endif
	}
	return 0;
}
Ps: nгo foi revisado a efetividade do cуdigo, e sim os brackets.
Em caso de dъvidas, utilize o tabulador do IpsBruno.


Re: error 021: symbol already defined: "SendClientMessage" - Misael - 04.03.2016

Quote:

C:\Users\Val\Desktop\[WE] World Evolution RPG [WE]123\filterscripts\fstartaruga.pwn(45) : error 021: symbol already defined: "SendClientMessage"
C:\Users\Val\Desktop\[WE] World Evolution RPG [WE]123\filterscripts\fstartaruga.pwn(47) : error 054: unmatched closing brace ("}")
C:\Users\Val\Desktop\[WE] World Evolution RPG [WE]123\filterscripts\fstartaruga.pwn(4 : error 010: invalid function or declaration

agora da isso.


Re: error 021: symbol already defined: "SendClientMessage" - Monotox - 04.03.2016

Quote:
Originally Posted by Misael
Посмотреть сообщение
agora da isso.
Jogue seu cуdigo aqui http://tabulador.medianewsonline.com/, compile e poste os erros especificando as linhas.


Re: error 021: symbol already defined: "SendClientMessage" - Misael - 04.03.2016

Quote:

C:\Users\Val\Desktop\[WE] World Evolution RPG [WE]123\filterscripts\fstartaruga.pwn(45) : error 021: symbol already defined: "SendClientMessage"
C:\Users\Val\Desktop\[WE] World Evolution RPG [WE]123\filterscripts\fstartaruga.pwn(47) : error 054: unmatched closing brace ("

Quote:

linha 47: }

Quote:

linha 45: SendClientMessage(playerid,-1, "Vocк nгo tem permissгo!");

apareceu isso.

era isso que vocк queria?


Re: error 021: symbol already defined: "SendClientMessage" - rhaegartargaryen - 04.03.2016

PHP код:
if (strcmp("/tartaruga"cmdtexttrue10) == 0)
{
if(
aInfo[playerid][Admin] == || aInfo[playerid][Moderador] == || aInfo[playerid][Ajudante] == 1)
{
SendClientMessage(playerid,-1"Vocк nгo tem permissгo!");
return 
1;
}
SendClientMessage(playerid,-1"vocк adcionou a tartaruga em sua cabeзa");
// funзгo de sear a tartaruga '-'
return 1;




Re: error 021: symbol already defined: "SendClientMessage" - Misael - 04.03.2016

Quote:
Originally Posted by rhaegartargaryen
Посмотреть сообщение
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
if (
strcmp("/tartaruga"cmdtexttrue10) == 0)
{
if(
aInfo[playerid][Admin] == || aInfo[playerid][Moderador] == || aInfo[playerid][Ajudante] == 1)
{
SendClientMessage(playerid,-1"Vocк nгo tem permissгo!");
}
return 
1;
}
SendClientMessage(playerid,-1"vocк adcionou a tartaruga em sua cabeзa");
// funзгo de sear a tartaruga '-'
}
return 
1;

Quote:

error 001: expected token: "#endif", but found "-end of file-"

o erro vem de uma linha que nem existe