[AJUDA] Nгo sei porque da esse erro
#1

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!
Reply
#2

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;
       }
Reply
#3

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.
Reply
#4

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;
       }
Reply
#5

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)