[AJUDA]3 Erros e 1 Aviso
#1

Meu gm Ta Com 3 Erros e 1 Aviso:

Код:
C:\ThuG Life City\gamemodes\BPS.pwn(194) : error: 021: symbol already defined: "PlayerName"
C:\ThuG Life City\gamemodes\BPS.pwn(23876) : error: 035: argument type mismatch (argument 1)
C:\ThuG Life City\gamemodes\BPS.pwn(41520) : error: 021: symbol already defined: "PlayerName"
C:\ThuG Life City\gamemodes\BPS.pwn(45897) : warning: 235: public function lacks forward declaration (symbol "Crescimento")
Linha do 1є Erro:
Код:
new PlayerName[MAX_PLAYER_NAME];
Linha do 2є Erro Obs: й do comando /lider irei postar o comando inteiro
Код:
if(strcmp(cmd, "/lider", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /lider [ID/Nome] [Numero(1-22)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 22 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Lider minimo 0, Maximo 21!"); return 1; }
			if (PlayerInfo[playerid][pAdminBPS] >= 1337)
			{
			        if(modoadmin[playerid] < 1)
		{
		SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб em modo de trabalho!");
		return 1;
		}
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
			            if(PlayerInfo[para1][pMembro] > 0)
			            {
			                SendClientMessage(playerid, COLOR_GREY, "   Esse jogador ja possui uma ORG!");
			                return 1;
			            }
			            new ttext[100];
	            		if(level == 0) { ttext = "Civil"; }
                        else if(level == 1) { ttext = "Policia Militar"; }
		                else if(level == 2) { ttext = "BOPE"; }
	                    else if(level == 3) { ttext = "Exйrcito"; }
		                else if(level == 4) { ttext = "Mйdico"; }
		                else if(level == 5) { ttext = "Mafia Yakuza"; }
		                else if(level == 6) { ttext = "FARC"; }
		                else if(level == 7) { ttext = "Prefeitura"; }
	                    else if(level == 8) { ttext = "Hitmans"; }
		                else if(level == 9) { ttext = "Repуrteres"; }
	                	else if(level == 10) { ttext = "Taxistas"; }
		                else if(level == 11) { ttext = "Cosa Nostra"; }
		                else if(level == 12) { ttext = "Groove Street"; }
		                else if(level == 13) { ttext = "Ballas"; }
		                else if(level == 14) { ttext = "Los Santos Vagos"; }
		                else if(level == 15) { ttext = "Varrio Los Aztecas"; }
                        else if(level == 16) { ttext = "Policia Federal"; }
                        else if(level == 17) { ttext = "Comando Vermelho"; }
                        else if(level == 18) { ttext = "PCC"; }
                        else if(level == 19) { ttext = "The Killers"; }
		                else if(level == 20) { ttext = "Guerrilheiros Israelitas"; }
		                else if(level == 21) { ttext = "Fast Furious"; }
		                else if(level == 22) { ttext = "Hells Angels"; }
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pLider] = level;
						format(string, sizeof(string), "Vocк foi promovido a lider da organizaзгo %s pelo admin %s", ttext,sendername);
						SendClientMessage(para1, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "Vocк promoveu %s a lider da organizaзгo %d (%s).", giveplayer,level,ttext);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						if(level == 0) { PlayerInfo[para1][pSkin] = 23; }
						else if(level == 1) { PlayerInfo[para1][pSkin] = 265; } //Police Force
						else if(level == 2) { PlayerInfo[para1][pSkin] = 285; } //PF/ATF
						else if(level == 3) { PlayerInfo[para1][pSkin] = 287; } //Exйrcito
						else if(level == 4) { PlayerInfo[para1][pSkin] = 228; } //Fire/Ambulance
						else if(level == 5) { PlayerInfo[para1][pSkin] = 294; } //Hamas
						else if(level == 6) { PlayerInfo[para1][pSkin] = 123; } //FARC
						else if(level == 7) { PlayerInfo[para1][pSkin] = 186; } //MaYou
						else if(level == 8) { PlayerInfo[para1][pSkin] = 294; } //Hitmans
						else if(level == 9) { PlayerInfo[para1][pSkin] = 227; } //noticias Reporters
						else if(level == 10) { PlayerInfo[para1][pSkin] = 61; } //Taxi Cab Company
						else if(level == 11) { PlayerInfo[para1][pSkin] = 120; } //Driving/Flying School
                        else if(level == 12) { PlayerInfo[para1][pSkin] = 270; } //Groove
                        else if(level == 13) { PlayerInfo[para1][pSkin] = 102; } //Ballas
                        else if(level == 14) { PlayerInfo[para1][pSkin] = 108; } //Vagos
                        else if(level == 15) { PlayerInfo[para1][pSkin] = 114; } //Varrios Los Aztecas
                        else if(level == 16) { PlayerInfo[para1][pSkin] = 59; } //Policia Federal
						else if(level == 17) { PlayerInfo[para1][pSkin] = 170; } //CV
						else if(level == 18) { PlayerInfo[para1][pSkin] = 47; } //PCC
                        else if(level == 19) { PlayerInfo[para1][pSkin] = 173; } //The Killers
						else if(level == 20) { PlayerInfo[para1][pSkin] = 113; } //GI
						else if(level == 21) { PlayerInfo[para1][pSkin] = 30; } //Fast Furious
						else if(level == 22) { PlayerInfo[para1][pSkin] = 248; } //Hells Angels
						gTeam[para1] = 11;
                        ConviteInfoOrg(PlayerName(para1), level, 6);
					    SetPlayerSpawn(para1);
					    PlayerInfo[para1][pCargo] = 6;
					    PlayerInfo[para1][pTeam] = 11;
					    SetPlayerSkin(para1, PlayerInfo[para1][pSkin]);
						if(level >= 1)
						{
   						format(string, sizeof(string), "• Existe um novo lнder da Org %s, use /lideres para mais informaзхes. •",NomeORG(para1));
						SendClientMessageToAll(GetPlayerColor(para1), string);
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem permissao para usar esse comando!");
			}
		}
		return 1;
	}
Linha do 2є Erro Separada
Код:
                        ConviteInfoOrg(PlayerName(para1), level, 6);
Linha do 3є Erro
Код:
	stock PlayerName(playerid)
{
	new Name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
	return Name;
	}
Linha do Aviso
Код:
public Crescimento(playerid)
{
        if(!Info[playerid][Arara])
        {
                KillTimer(Info[playerid][Timer]);
                return 0;
        }
        if(!Info[playerid][Racao] && Info[playerid][Grande] < 5)
        {
                SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк esqueceu de alimentar a sua Arara e ela morreu!");
                RemovePlayerAttachedObject(playerid, 0);
                Info[playerid][Arara] = false;
                Info[playerid][Grande] = 0;
                KillTimer(Info[playerid][Timer]);
                return 1;
        }
        new str[30];
        Info[playerid][Grande]++;
        Info[playerid][Racao] = false;
        format(str, sizeof str, "A sua Arara cresceu! (%d/5)", Info[playerid][Grande]);
        SendClientMessage(playerid, COLOR_DBLUE, str);
        if(Info[playerid][Grande] >= 5)
        {
                SendClientMessage(playerid, BRANCO, "A Sua Arara estб grande e pronta para ser vendida! use: /venderarara!");
                KillTimer(Info[playerid][Timer]);
        }
        return 1;
}
Ajudem Pleaseeeeee
Reply
#2

ERRO 1:
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
EXCLUA ISSO

ERRO 2: Verificando

ERRO 3: Depois que vc excluir o erro 1 o erro 3 naum ficara mais como ja definido

ERRO: 4: Coloque isso no topo do gm:
pawn Код:
forward Crescimento(playerid);
Reply
#3

symbol already defined: "PlayerName" - Jб foi definido "PlayerName"
•Se o new PlayerName tiver lб pro comeзo do GM apague todos PlayerName deixando somente esse do comeзo do GM.

•Se tiver mais que um no code, apague um e deixe o outro.
Reply
#4

Quote:
Originally Posted by |_MeGaTroN_|
Посмотреть сообщение
ERRO 1:
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
EXCLUA ISSO

ERRO 2: Verificando

ERRO 3: Depois que vc excluir o erro 1 o erro 3 naum ficara mais como ja definido

ERRO: 4: Coloque isso no topo do gm:
pawn Код:
forward Crescimento(playerid);
Funcionou Agora Ficou 2 Erros
Код:
C:\ThuG Life City\gamemodes\BPS.pwn(23876) : error: 035: argument type mismatch (argument 1)
C:\ThuG Life City\gamemodes\BPS.pwn(41520) : error: 021: symbol already defined: "PlayerName"
Reply
#5

Me fale qual a linha ( 23876 ).

Exclua a Linha ( 41520 ).
Reply
#6

Comando da linha 23876:
Код:
if(strcmp(cmd, "/lider", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /lider [ID/Nome] [Numero(1-22)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 22 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Lider minimo 0, Maximo 21!"); return 1; }
			if (PlayerInfo[playerid][pAdminBPS] >= 1337)
			{
			        if(modoadmin[playerid] < 1)
		{
		SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб em modo de trabalho!");
		return 1;
		}
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
			            if(PlayerInfo[para1][pMembro] > 0)
			            {
			                SendClientMessage(playerid, COLOR_GREY, "   Esse jogador ja possui uma ORG!");
			                return 1;
			            }
			            new ttext[100];
	            		if(level == 0) { ttext = "Civil"; }
                        else if(level == 1) { ttext = "Policia Militar"; }
		                else if(level == 2) { ttext = "BOPE"; }
	                    else if(level == 3) { ttext = "Exйrcito"; }
		                else if(level == 4) { ttext = "Mйdico"; }
		                else if(level == 5) { ttext = "Mafia Yakuza"; }
		                else if(level == 6) { ttext = "FARC"; }
		                else if(level == 7) { ttext = "Prefeitura"; }
	                    else if(level == 8) { ttext = "Hitmans"; }
		                else if(level == 9) { ttext = "Repуrteres"; }
	                	else if(level == 10) { ttext = "Taxistas"; }
		                else if(level == 11) { ttext = "Cosa Nostra"; }
		                else if(level == 12) { ttext = "Groove Street"; }
		                else if(level == 13) { ttext = "Ballas"; }
		                else if(level == 14) { ttext = "Los Santos Vagos"; }
		                else if(level == 15) { ttext = "Varrio Los Aztecas"; }
                        else if(level == 16) { ttext = "Policia Federal"; }
                        else if(level == 17) { ttext = "Comando Vermelho"; }
                        else if(level == 18) { ttext = "PCC"; }
                        else if(level == 19) { ttext = "The Killers"; }
		                else if(level == 20) { ttext = "Guerrilheiros Israelitas"; }
		                else if(level == 21) { ttext = "Fast Furious"; }
		                else if(level == 22) { ttext = "Hells Angels"; }
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pLider] = level;
						format(string, sizeof(string), "Vocк foi promovido a lider da organizaзгo %s pelo admin %s", ttext,sendername);
						SendClientMessage(para1, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "Vocк promoveu %s a lider da organizaзгo %d (%s).", giveplayer,level,ttext);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						if(level == 0) { PlayerInfo[para1][pSkin] = 23; }
						else if(level == 1) { PlayerInfo[para1][pSkin] = 265; } //Police Force
						else if(level == 2) { PlayerInfo[para1][pSkin] = 285; } //PF/ATF
						else if(level == 3) { PlayerInfo[para1][pSkin] = 287; } //Exйrcito
						else if(level == 4) { PlayerInfo[para1][pSkin] = 228; } //Fire/Ambulance
						else if(level == 5) { PlayerInfo[para1][pSkin] = 294; } //Hamas
						else if(level == 6) { PlayerInfo[para1][pSkin] = 123; } //FARC
						else if(level == 7) { PlayerInfo[para1][pSkin] = 186; } //MaYou
						else if(level == 8) { PlayerInfo[para1][pSkin] = 294; } //Hitmans
						else if(level == 9) { PlayerInfo[para1][pSkin] = 227; } //noticias Reporters
						else if(level == 10) { PlayerInfo[para1][pSkin] = 61; } //Taxi Cab Company
						else if(level == 11) { PlayerInfo[para1][pSkin] = 120; } //Driving/Flying School
                        else if(level == 12) { PlayerInfo[para1][pSkin] = 270; } //Groove
                        else if(level == 13) { PlayerInfo[para1][pSkin] = 102; } //Ballas
                        else if(level == 14) { PlayerInfo[para1][pSkin] = 108; } //Vagos
                        else if(level == 15) { PlayerInfo[para1][pSkin] = 114; } //Varrios Los Aztecas
                        else if(level == 16) { PlayerInfo[para1][pSkin] = 59; } //Policia Federal
						else if(level == 17) { PlayerInfo[para1][pSkin] = 170; } //CV
						else if(level == 18) { PlayerInfo[para1][pSkin] = 47; } //PCC
                        else if(level == 19) { PlayerInfo[para1][pSkin] = 173; } //The Killers
						else if(level == 20) { PlayerInfo[para1][pSkin] = 113; } //GI
						else if(level == 21) { PlayerInfo[para1][pSkin] = 30; } //Fast Furious
						else if(level == 22) { PlayerInfo[para1][pSkin] = 248; } //Hells Angels
						gTeam[para1] = 11;
                        ConviteInfoOrg(PlayerName(para1), level, 6);
					    SetPlayerSpawn(para1);
					    PlayerInfo[para1][pCargo] = 6;
					    PlayerInfo[para1][pTeam] = 11;
					    SetPlayerSkin(para1, PlayerInfo[para1][pSkin]);
						if(level >= 1)
						{
   						format(string, sizeof(string), "• Existe um novo lнder da Org %s, use /lideres para mais informaзхes. •",NomeORG(para1));
						SendClientMessageToAll(GetPlayerColor(para1), string);
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem permissao para usar esse comando!");
			}
		}
		return 1;
	}
Linha Separada:
Код:
                        ConviteInfoOrg(PlayerName(para1), level, 6);
Reply
#7

pawn Код:
ConviteInfoOrg(PlayerName, level, 6);
Reply
#8

Coloquei esse codigo e deu esse erro
Код:
C:\ThuG Life City\gamemodes\BPS.pwn(23876) : error: 076: syntax error in the expression, or invalid function call
Reply
#9

Tenta usar assim:
pawn Код:
new para1name[MAX_PLAYER_NAME];
GetPlayerName(para1,para1name,sizeof(para1name));
ConviteInfoOrg(para1name, level, 6);
Reply
#10

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
Tenta usar assim:
pawn Код:
new para1name[MAX_PLAYER_NAME];
GetPlayerName(para1,para1name,sizeof(para1name));
ConviteInfoOrg(para1name, level, 6);
C:\ThuG Life City\gamemodes\BPS.pwn(2387 : error: 035: argument type mismatch (argument 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)