new string[16]; public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) { format(string,sizeof(string),"-%.0f hp",amount); SetPlayerChatBubble(playerid,string,0xFFFFFF,150.0 ,2500); return 1; } |
And this is the warnings: warning 219: local variable "string" shadows a variable at a preceding level warning 219: local variable "string" shadows a variable at a preceding level warning 219: local variable "string" shadows a variable at a preceding level warning 219: local variable "string" shadows a variable at a preceding level warning 219: local variable "string" shadows a variable at a preceding level warning 219: local variable "string" shadows a variable at a preceding level |
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new string[16];
format(string,sizeof(string),"-%.0f hp",amount);
SetPlayerChatBubble(playerid,string,0xFFFFFF,150.0 ,2500);
return 1;
}
pawn Код:
|
It's something to see, the String is above the Callback, you should leave it.
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) { new string[256]; format(string,sizeof(string),"-%.0f hp",amount); SetPlayerChatBubble(playerid,string,0xFFFFFF,150.0 ,2500); return 1; } |
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new szString[16];
format(szString,sizeof(szString),"-%.0f hp",amount);
SetPlayerChatBubble(playerid,szString,0xFFFFFF,150.0 ,2500);
return 1;
warning 219: local variable "string" shadows a variable at a preceding level |