SA-MP Forums Archive
[Ajuda] Ajuda 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] Ajuda Erro! (/showthread.php?tid=445821)



Ajuda Erro! - VSxD - 23.06.2013

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;
}




Re: Ajuda Erro! - Knight97 - 23.06.2013

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