#1

Cant see what i did wrong here someone can help me out? thanks in advance!

Код:
./includes/callbacks.pwn(4132) : warning 219: local variable "pHealth" shadows a variable at a preceding level
./includes/callbacks.pwn(4133) : error 035: argument type mismatch (argument 2)
./includes/callbacks.pwn(4132) : warning 203: symbol is never used: "pHealth"
PHP код:
}
forward vitals(playerid);
public 
vitals(playerid)
{
    new 
string[25];
    new 
Float:pHealthFloat:pArmour;
    
GetPlayerHealth(playerid,pHealth);
    
GetPlayerArmour(playerid,pArmour);
    
format(stringsizeof(string), "%.0f%"pHealth);
    
TextDrawSetString(Health[playerid], string);
    
format(stringsizeof(string), "%.0f%"pArmour);
    
TextDrawSetString(Armour[playerid], string);

Reply
#2

.
Код:
/includes/callbacks.pwn(4132) : warning 219: local variable "pHealth" shadows a variable at a preceding level
that mean you already have new FloatHealth some where so instead it try to add FloatHealth1 >>

PHP код:
forward vitals(playerid); 
public 
vitals(playerid

    new 
string[25]; 
    new 
Float:pHealth1Float:pArmour
    
GetPlayerHealth(playerid,pHealth1); 
    
GetPlayerArmour(playerid,pArmour); 
    
format(stringsizeof(string), "%.0f%"pHealth1); 
    
TextDrawSetString(Health[playerid], string); 
    
format(stringsizeof(string), "%.0f%"pArmour); 
    
TextDrawSetString(Armour[playerid], string); 

Reply
#3

Quote:
Originally Posted by jlalt
Посмотреть сообщение
.
Код:
/includes/callbacks.pwn(4132) : warning 219: local variable "pHealth" shadows a variable at a preceding level
that mean you already have new FloatHealth some where so instead it try to add FloatHealth1 >>

PHP код:
forward vitals(playerid); 
public 
vitals(playerid

    new 
string[25]; 
    new 
Float:pHealth1Float:pArmour
    
GetPlayerHealth(playerid,pHealth1); 
    
GetPlayerArmour(playerid,pArmour); 
    
format(stringsizeof(string), "%.0f%"pHealth1); 
    
TextDrawSetString(Health[playerid], string); 
    
format(stringsizeof(string), "%.0f%"pArmour); 
    
TextDrawSetString(Armour[playerid], string); 

I cant find the other one floathealth lol xD
Reply
#4

Is that code in /includes/callbacks.pwn? Otherwise pHealth is used in the include stated.
Reply
#5

Quote:
Originally Posted by Weponz
Посмотреть сообщение
Is that code in /includes/callbacks.pwn? Otherwise pHealth is used in the include stated.
I found out what was the problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)