[Ajuda] Ajuda Erro!
#1

Linhas Vermelhas sвo as que tao dando erros
------------------------------------------------------------------
™.PWN(89044) : error 012: invalid function call, not a valid address
™.PWN(89044) : warning 215: expression has no effect
™.PWN(89044) : error 001: expected token: ";", but found ")"
™.PWN(89044) : error 029: invalid expression, assumed zero
™.PWN(89044) : fatal error 107: too many error messages on one line
------------------------------------------------------------------
Quote:

forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
MostrarTextVida(playerid);
if(IsPlayerConnected(playerid))
{
new str[256];
PlayerPlaySound(playerid, 1095, 0.0, 0.0, 0.0);
PlayerPlaySound(issuerid, 6401, 0.0, 0.0, 0.0);
//===================[ playerid ]==================================/157
new Float:health;
new PlayerName[MAX_PLAYER_NAME];
GetPlayerHealth(playerid, health);
if(issuerid == INVALID_PLAYER_ID)
{
//GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
KillTimer(TempoMostrarLife[playerid]);
TextDrawShowForPlayer(playerid, MostrarVida[playerid]);
format(str,sizeof(str),"~r~hp:~w~ -%.1f", amount);
TextDrawSetString(MostrarVida[playerid], str);
TempoMostrarLife[playerid] = SetTimerEx("HideTextoLife", 3000, 0, "i", playerid);
MostrandoVida[playerid] = 1;
}
else
{
KillTimer(TempoMostrarLife[playerid]);
TextDrawShowForPlayer(playerid, MostrarVida[playerid]);
format(str,sizeof(str),"~y~%s ~n~~w~tirou: ~r~-%.1f",PlayerName(issuerid), amount);
TextDrawSetString(MostrarVida[playerid], str);
TempoMostrarLife[playerid] = SetTimerEx("HideTextoLife", 3000, 0, "i", playerid);
MostrandoVida[playerid] = 1;
}
//==================[ issuerid ] ======================================
KillTimer(TempoMostrarLife[issuerid]);
TextDrawShowForPlayer(issuerid, MostrarVida[issuerid]);
format(str,sizeof(str),"~y~%s:~g~ -%.1f",PlayerName(playerid), amount);
TextDrawSetString(MostrarVida[issuerid], str);
TempoMostrarLife[issuerid] = SetTimerEx("HideTextoLife", 3000, 0, "i", issuerid);
MostrandoVida[issuerid] = 1;
}
return true;
}

Reply
#2

pawn Код:
~y~%s ~n~~w~tirou: ~r~-%.1f
o PlayerName tem um parametro a seguir (isuserid), sу que na funзгo acima sу estб a declarar %s (que irб ser o nome)... retire o (userid).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)