[Ajuda] Erro estranho
#1

Bem eu queria adicionar uma org neutra para poder utilizar o comando /taser mas fica dando esse erro e nгo consigo identificar o problema.
Erros:
Код:
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60247) : error 017: undefined symbol "string"
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60247) : error 017: undefined symbol "string"
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60247) : error 029: invalid expression, assumed zero
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60247) : fatal error 107: too many error messages on one line
Linha do erro:
Код:
format(string, sizeof(string), "* %s guardou seu taser no coldre.", NomePlayer(playerid));
Cуdigo:
Код:
CMD:taser(playerid, params[])
	{
		if(PlayerInfo[playerid][pJailed] != 0)
	    {
			SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando na cadeia!");
	    }
	    if(IsPlayerInAnyVehicle(playerid))
		return SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando dentro de um veнculo!");

	    if(PlayerInfo[playerid][pJailed] == 9)
    	{
			SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando nas Celas da Administraзгo!");
  			return true;
	    }
   		if(IsACop(playerid) && GetPlayerOrg(playerid) == 10)
        	if(InTaser[playerid] == true)
         {
				RemovePlayerAttachedObjectEx(playerid,Vaga_Taser);
            	InTaser[playerid] = false;
            	RemoveArmament(playerid);
				format(string, sizeof(string), "* %s guardou seu taser no coldre.", NomePlayer(playerid));
				SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				if(balaseagle[playerid] < 1)SetPlayerAmmo(playerid, 2, 0);
				return true;
        	}
        	if(InTaser[playerid] == false)
        	{
				if(gettime() < GetPVarInt(playerid, #VarFlood9))
				    return SendClientMessage(playerid, COLOR_GRAD1, "O Taser esta recarregando, espere 15 segundos para pegar novamente.");
				SetPVarInt(playerid, #VarFlood9, gettime()+15);
				InTaser[playerid] = true;
				SetArmament(playerid, 18642);
				new id = CountAttachedObjects(playerid);
            	SetPlayerAttachedObject(playerid, 0, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
				SetPlayerAttachedObjectEx(18642,Vaga_Taser,playerid,id);
				format(string, sizeof(string), "* %s retirou seu taser do coldre.", NomePlayer(playerid));
				SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            	return true;
        	}
        return true;
    	}
    	else
    	{
        	SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo й um COP ou Guarda.");
    	}
   	 	return true;
	}
Reply
#2

PHP код:
 CMD:taser(playeridparams[])
    {
        if(
PlayerInfo[playerid][pJailed] != 0)
        {
            
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando na cadeia!");
        }
        if(
IsPlayerInAnyVehicle(playerid))
        return 
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando dentro de um veнculo!");

        if(
PlayerInfo[playerid][pJailed] == 9)
        {
            
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando nas Celas da Administraзгo!");
              return 
true;
        }
           if(
IsACop(playerid) && GetPlayerOrg(playerid) == 10)
            if(
InTaser[playerid] == true)
         {
                
RemovePlayerAttachedObjectEx(playerid,Vaga_Taser);
                
InTaser[playerid] = false;
                
RemoveArmament(playerid);
                                new 
string[128];
                
format(stringsizeof(string), "* %s guardou seu taser no coldre."NomePlayer(playerid));
                
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                if(
balaseagle[playerid] < 1)SetPlayerAmmo(playerid20);
                return 
true;
            }
            if(
InTaser[playerid] == false)
            {
                if(
gettime() < GetPVarInt(playerid#VarFlood9))
                    
return SendClientMessage(playeridCOLOR_GRAD1"O Taser esta recarregando, espere 15 segundos para pegar novamente.");
                
SetPVarInt(playerid#VarFlood9, gettime()+15);
                
InTaser[playerid] = true;
                
SetArmament(playerid18642);
                new 
id CountAttachedObjects(playerid);
                
SetPlayerAttachedObject(playerid01864260.060.010.08180.00.00.0);
                
SetPlayerAttachedObjectEx(18642,Vaga_Taser,playerid,id);
                
format(stringsizeof(string), "* %s retirou seu taser do coldre."NomePlayer(playerid));
                
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 
true;
            }
        return 
true;
        }
        else
        {
            
SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo й um COP ou Guarda.");
        }
            return 
true;
    } 
Reply
#3

[PHP]
PHP код:
CMD:taser(playeridparams[])
    {
        if(
PlayerInfo[playerid][pJailed] != 0)
        {
            
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando na cadeia!");
        }
        if(
IsPlayerInAnyVehicle(playerid))
        return 
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando dentro de um veнculo!");

        if(
PlayerInfo[playerid][pJailed] == 9)
        {
            
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando nas Celas da Administraзгo!");
              return 
true;
        }
           if(
IsACop(playerid) && GetPlayerOrg(playerid) == 10)
            if(
InTaser[playerid] == true)
         {
                new 
string[200];
                
RemovePlayerAttachedObjectEx(playerid,Vaga_Taser);
                
InTaser[playerid] = false;
                
RemoveArmament(playerid);
                
format(stringsizeof(string), "* %s guardou seu taser no coldre."NomePlayer(playerid));
                
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                if(
balaseagle[playerid] < 1)SetPlayerAmmo(playerid20);
                return 
true;
            }
            if(
InTaser[playerid] == false)
            {
                if(
gettime() < GetPVarInt(playerid#VarFlood9))
                    
return SendClientMessage(playeridCOLOR_GRAD1"O Taser esta recarregando, espere 15 segundos para pegar novamente.");
                
SetPVarInt(playerid#VarFlood9, gettime()+15);
                
InTaser[playerid] = true;
                
SetArmament(playerid18642);
                new 
id CountAttachedObjects(playerid);
                
SetPlayerAttachedObject(playerid01864260.060.010.08180.00.00.0);
                
SetPlayerAttachedObjectEx(18642,Vaga_Taser,playerid,id);
                
format(stringsizeof(string), "* %s retirou seu taser do coldre."NomePlayer(playerid));
                
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 
true;
            }
        return 
true;
        }
        else
        {
            
SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo й um COP ou Guarda.");
        }
            return 
true;
    } 
Reply
#4

Fiz dos dois jeitos listados acima e os erros continuam persistindo :/
Reply
#5

Код:
CMD:taser(playerid, params[])
	{
	     new string[200];
		if(PlayerInfo[playerid][pJailed] != 0)
	    {
			SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando na cadeia!");
	    }
	    if(IsPlayerInAnyVehicle(playerid))
		return SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando dentro de um veнculo!");

	    if(PlayerInfo[playerid][pJailed] == 9)
    	{
			SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando nas Celas da Administraзгo!");
  			return true;
	    }
   		if(IsACop(playerid) && GetPlayerOrg(playerid) == 10)
        	if(InTaser[playerid] == true)
         {
				RemovePlayerAttachedObjectEx(playerid,Vaga_Taser);
            	InTaser[playerid] = false;
            	RemoveArmament(playerid);
				format(string, sizeof(string), "* %s guardou seu taser no coldre.", NomePlayer(playerid));
				SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				if(balaseagle[playerid] < 1)SetPlayerAmmo(playerid, 2, 0);
				return true;
        	}
        	if(InTaser[playerid] == false)
        	{
				if(gettime() < GetPVarInt(playerid, #VarFlood9))
				    return SendClientMessage(playerid, COLOR_GRAD1, "O Taser esta recarregando, espere 15 segundos para pegar novamente.");
				SetPVarInt(playerid, #VarFlood9, gettime()+15);
				InTaser[playerid] = true;
				SetArmament(playerid, 18642);
				new id = CountAttachedObjects(playerid);
            	SetPlayerAttachedObject(playerid, 0, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
				SetPlayerAttachedObjectEx(18642,Vaga_Taser,playerid,id);
				format(string, sizeof(string), "* %s retirou seu taser do coldre.", NomePlayer(playerid));
				SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            	return true;
        	}
        return true;
    	}
    	else
    	{
        	SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo й um COP ou Guarda.");
    	}
   	 	return true;
	}
Reply
#6

PHP код:
CMD:taser(playeridparams[])
{
    new 
string[MAX_PLAYER_NAME 10];
    if(
PlayerInfo[playerid][pJailed] != 0)
        return 
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando na cadeia!");
    if(
IsPlayerInAnyVehicle(playerid))
        return 
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando dentro de um veнculo!");
    if(
PlayerInfo[playerid][pJailed] == 9)
        return 
SendClientMessage(playerid,COLOR_GRAD1," Vocк nгo pode usar este comando nas Celas da Administraзгo!");
    if(
IsACop(playerid) && GetPlayerOrg(playerid) == 10)
    {
        if(
InTaser[playerid] == true)
        {
            
RemovePlayerAttachedObjectEx(playerid,Vaga_Taser);
            
InTaser[playerid] = false;
            
RemoveArmament(playerid);
            
format(stringsizeof(string), "* %s guardou seu taser no coldre."NomePlayer(playerid));
            
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            if(
balaseagle[playerid] < 1)SetPlayerAmmo(playerid20);
            return 
true;
        }
        if(
InTaser[playerid] == false)
        {
            if(
gettime() < GetPVarInt(playerid#VarFlood9))
            
return SendClientMessage(playeridCOLOR_GRAD1"O Taser esta recarregando, espere 15 segundos para pegar novamente.");
            
SetPVarInt(playerid#VarFlood9, gettime()+15);
            
InTaser[playerid] = true;
            
SetArmament(playerid18642);
            new 
id CountAttachedObjects(playerid);
            
SetPlayerAttachedObject(playerid01864260.060.010.08180.00.00.0);
            
SetPlayerAttachedObjectEx(18642,Vaga_Taser,playerid,id);
            
format(stringsizeof(string), "* %s retirou seu taser do coldre."NomePlayer(playerid));
            
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 
true;
        }
    }
    else
    {
        
SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo й um COP ou Guarda.");
    }
    return 
true;

Reply
#7

Novos erros apуs aplicar os ajustes listados
Код:
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60267) : warning 209: function "cmd_taser" should return a value
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60268) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60272) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60289) : error 029: invalid expression, assumed zero
C:\Users\Cliente\Desktop\[] GTA SA []\Servidor\Brasil Game Over\gamemodes\BPS.pwn(60319) : error 029: invalid expression, assumed zero
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)