SA-MP Forums Archive
[AJUDA] Nгo sei porque da esse erro - 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] Nгo sei porque da esse erro (/showthread.php?tid=223135)



[AJUDA] Nгo sei porque da esse erro - deregudegu - 08.02.2011

Bom eu fui fazer um cmd de abrir e fechar portгo para meu GF editado, mas da erro e nгo sei porque, jб tentei tudo que cabia a mim, assim venho pedir a ajuda de vocкs.

Erro:
Код:
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : error 001: expected token: ",", but found "-string-"
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : warning 215: expression has no effect
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : warning 215: expression has no effect
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : error 001: expected token: ";", but found ")"
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : error 029: invalid expression, assumed zero
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : fatal error 107: too many error messages on one line
Linhas do GM:
Код:
if(strcmp(cmd,"/axan", true)==0)
	{
        if(PlayerInfo[playerid][pDonateRank] >= 3)
        {
            GameTextForPlayer(playerid, "~r~Abrindo...", 9000, 1);
	        MoveObject(xande,3514.0573730469,-530.31579589844,57.165679931641,1.5);
        	return 1;
	    }
	   return 1;
	}
	if(strcmp(cmd"/fxan", true)==0) //linha 18598
	{
	   if(PlayerInfo[playerid][pDonateRank] >= 3)
       {
	       GameTextForPlayer(playerid, "~r~Fechando...", 9000, 1);
	       MoveObject(xande,3511.9663085938,-530.97131347656,51.923530578613,1.5);
	       return 1;
	   }
	return 1;
	}
Obrigado!


Re: [AJUDA] Nгo sei porque da esse erro - [Ips]Guh - 08.02.2011

tenta
pawn Код:
if(strcmp(cmd,"/axan", true)==0)
    {
        if(PlayerInfo[playerid][pDonateRank] >= 3)
        {
            GameTextForPlayer(playerid, "~r~Abrindo...", 9000, 1);
            MoveObject(xande,3514.0573730469,-530.31579589844,57.165679931641,1.5);
            return 1;
        }

    if(strcmp(cmd"/fxan", true)==0) //linha 18598
    {
       if(PlayerInfo[playerid][pDonateRank] >= 3)
       {
           GameTextForPlayer(playerid, "~r~Fechando...", 9000, 1);
           MoveObject(xande,3511.9663085938,-530.97131347656,51.923530578613,1.5);
           return 1;
       }



Re: [AJUDA] Nгo sei porque da esse erro - deregudegu - 08.02.2011

Ainda continua dando erro...
Novo cmd:
Код:
    if(strcmp(cmd,"/axan", true)==0)
	{
        if(PlayerInfo[playerid][pDonateRank] == 3)
        {
            GameTextForPlayer(playerid, "~r~Abrindo...", 9000, 1);
	        MoveObject(xande,3514.0573730469,-530.31579589844,57.165679931641,1.5);
            return 1;
        }
	}
	if(strcmp(cmd"/fxan", true)==0)
	{
	   if(PlayerInfo[playerid][pDonateRank] >= 3)
       {
	       GameTextForPlayer(player,id, "~r~Fechando...", 9000, 1);
	       MoveObject(xande,3511.9663085938,-530.97131347656,51.923530578613,1.5);
           return 1;
        }
	}
Erros:
Код:
Compilando Cуpia de RTG8.pwn...
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18506) : warning 215: expression has no effect
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : error 001: expected token: ",", but found "-string-"
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : warning 215: expression has no effect
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : warning 215: expression has no effect
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : error 001: expected token: ";", but found ")"
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : error 029: invalid expression, assumed zero
E:\RTG\gamemodes\Cуpia de RTG8.pwn(18598) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: [AJUDA] Nгo sei porque da esse erro - Macintosh - 08.02.2011

Tenta!

pawn Код:
if(strcmp(cmdtext, "/fxan", true) == 0)
    {
        if(PlayerInfo[playerid][pDonateRank] >= 3)
        {
            GameTextForPlayer(playerid, "~r~Abrindo...", 9000, 1);
            MoveObject(xande,3514.0573730469,-530.31579589844,57.165679931641,1.5);
            return 1;
        }

    if(strcmp(cmdtext, "/fxan", true) == 0)
    {
       if(PlayerInfo[playerid][pDonateRank] >= 3)
       {
           GameTextForPlayer(playerid, "~r~Fechando...", 9000, 1);
           MoveObject(xande,3511.9663085938,-530.97131347656,51.923530578613,1.5);
           return 1;
       }



Re: [AJUDA] Nгo sei porque da esse erro - Josma_cmd - 09.02.2011

Voce ta esquecendo de por virgula antes das aspas que contem o comando.
Olha a diferenзa.
pawn Код:
if(strcmp(cmd"/fxan", true)==0)
if(strcmp(cmd, "/fxan", true) == 0)
voce pode usar tambem cmdtext ao inves de cmd como citou o Lucas
pawn Код:
if(strcmp(cmdtext, "/fxan", true) == 0)