Converting a string to an integer [I think]
#3

Quote:
Originally Posted by Schneider
Посмотреть сообщение
pawn Код:
if(health <= 400) return SendClientMessage(playerid, COLOR_RED, "This vehicle is too damaged.");
PlayerInfo[playerid][pVehHealth] = health;
Also make sure "pVehHealth" is defined as a float in your enum:
pawn Код:
Float:pVehHealth,
Whenever I use this:
pawn Код:
enum pInfo
{
     Float:pVehHealth,
}
I'm getting tag mismatch errors on these lines of code:
pawn Код:
dini_IntSet(file, "VehicleHealth", PlayerInfo[playerid][pVehHealth]); // Tag Mismatch
new vhealth = PlayerInfo[playerid][pVehHealth]; // Tag Mismatch
The reason for "new vhealth" is so I can use it like this:

pawn Код:
new vhealth = PlayerInfo[playerid][pVehHealth];
new vid = PlayerInfo[playerid][pVeh];
SetVehicleHealth(vid, vhealth);
Reply


Messages In This Thread
Converting a string to an integer [I think] - by Ciarannn - 22.01.2015, 15:31
Re: Converting a string to an integer [I think] - by Schneider - 22.01.2015, 15:39
Re: Converting a string to an integer [I think] - by Ciarannn - 25.01.2015, 14:45
Re: Converting a string to an integer [I think] - by Ciarannn - 25.01.2015, 14:54
Re: Converting a string to an integer [I think] - by Sawalha - 25.01.2015, 14:54

Forum Jump:


Users browsing this thread: 1 Guest(s)