[HELP] With /heal.
#1

Hey. I have this command

pawn Код:
COMMAND:heal(playerid, params[])
{
    new Price, Float: PlayerHealth, string[64];
    GetPlayerHealth(playerid, PlayerHealth);
    Price = 100 - PlayerHealth;
    SetPlayerHealth(playerid, 100);
    GivePlayerMoney(playerid, -Price);
    format(string, sizeof(string), "You have been healed. You payed %d.", Price);
    SendClientMessage(playerid, GREEN, string);
    return 1;
}
But it shows this: warning 213: tag mismatch - Price = 100 - PlayerHealth;
Reply
#2

Try making the price a float.
Reply
#3

Nope.
Reply
#4

pawn Код:
Price = floatround(100.0 - PlayerHealth);
Reply
#5

Works like a charm. Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)