warning
#1

bueno poniendo un sistema de tazer todo va bien pero al momento de compilar me tira un warning que es:
warning 209: function "S@@_OnPlayerTakeDamage" should return a value

por mas que le ponga el return 1; no lo quita pongo return 1; y me tira error el codigo que tengo es asi:

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
		{
		    //new Float:chaleco, Float:Dano;
		    if(weaponid == 0) //Puсos
		    {
		   	GivePlayerHealth(playerid, -amount*(float(PlayerInfo[issuerid][pFuerza]))/100);
		    }
            if(issuerid != INVALID_PLAYER_ID)
            {
            if(weaponid == 23 && PlayerInfo[issuerid][pManoDer] == 38) //Mensaje de daсo por tбser
            {
			new string[128];
        	format(string, sizeof(string), "* %s dispara a %s (Pistola tбser)", pName(issuerid), pName(playerid));
            Acciones(playerid, 8, string);
        	format(string, sizeof(string), "* %s dispara a %s (Pistola tбser)", pName(issuerid), pName(playerid));
            Acciones(playerid, 8, string);
            }
            }
            if(weaponid == 23 && PlayerInfo[issuerid][pManoDer] == 38 && !IsPlayerInAnyVehicle(playerid)) //Tбser
            {
			if(IsPlayerInAnyVehicle(playerid)){return 1;}
	        new string[128];
            TogglePlayerControllable(playerid, 0);
			Taseado[playerid] = 1;
			SetTimerEx("Destasear", 20000, false, "i", playerid);
            PlayerPlaySound(playerid, 6003, 0.0, 0.0, 0.0);
            PlayerPlaySound(issuerid, 6003, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "* Has sido taseado por %s", pName(issuerid));
            SendClientMessage(playerid, AzulClaro, string);
			format(string, sizeof(string), "* Has taseado a %s", pName(playerid));
			SendClientMessage(issuerid, AzulClaro, string);
            }
            }
Reply
#2

return 1;
}

їLe has cerrado la llave?
Reply
#3

sip la e cerrado pero cuando pongo return 1;} da error nse porque
Reply
#4

Prueba asн

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    //new Float:chaleco, Float:Dano;
    if(weaponid == 0) //Puсos
    {
        GivePlayerHealth(playerid, -amount*(float(PlayerInfo[issuerid][pFuerza]))/100);
    }
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(weaponid == 23 && PlayerInfo[issuerid][pManoDer] == 38) //Mensaje de daсo por tбser
        {
            new string[128];
            format(string, sizeof(string), "* %s dispara a %s (Pistola tбser)", pName(issuerid), pName(playerid));
            Acciones(playerid, 8, string);
            format(string, sizeof(string), "* %s dispara a %s (Pistola tбser)", pName(issuerid), pName(playerid));
            Acciones(playerid, 8, string);
        }
        if(weaponid == 23 && PlayerInfo[issuerid][pManoDer] == 38 && !IsPlayerInAnyVehicle(playerid)) //Tбser
        {
            if(IsPlayerInAnyVehicle(playerid)){return 1;}
            new string[128];
            TogglePlayerControllable(playerid, 0);
            Taseado[playerid] = 1;
            SetTimerEx("Destasear", 20000, false, "i", playerid);
            PlayerPlaySound(playerid, 6003, 0.0, 0.0, 0.0);
            PlayerPlaySound(issuerid, 6003, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "* Has sido taseado por %s", pName(issuerid));
            SendClientMessage(playerid, AzulClaro, string);
            format(string, sizeof(string), "* Has taseado a %s", pName(playerid));
            SendClientMessage(issuerid, AzulClaro, string);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)