20.08.2011, 14:58
Hey guys
Im trying to get my K/D ratio. I know it is (kills/deaths), but it isnt working.
In my script i did it like:
But in my textdraw it just shows 0.0000000(not sure howmutch 0's, but there are some)
Also, yes i know the variables contain some kills/deaths (8/4). So my K/D should be 2, but its still 0.000000
Anyone know how to solve this?
Second question:
How can i get a password out of a file?
Im using y_ini, and trying to get a whirlpool hashed password out of it to compare it with the inputtext.
Ive tried to store it in a variable with INI_String, but that didnt work (Gave me the error Undefined symbol: INI_String)
Any help?
~Wesley
Im trying to get my K/D ratio. I know it is (kills/deaths), but it isnt working.
In my script i did it like:
pawn Code:
format(KD, sizeof KD, "Kills: %i ~n~Deaths: %i ~n~K/D Ratio: %f",PlayerInfo[playerid][pRKills], PlayerInfo[playerid][pRDeaths], ((PlayerInfo[playerid][pRKills]) / (PlayerInfo[playerid][pRDeaths])));
Also, yes i know the variables contain some kills/deaths (8/4). So my K/D should be 2, but its still 0.000000
Anyone know how to solve this?
Second question:
How can i get a password out of a file?
Im using y_ini, and trying to get a whirlpool hashed password out of it to compare it with the inputtext.
Ive tried to store it in a variable with INI_String, but that didnt work (Gave me the error Undefined symbol: INI_String)
Any help?
~Wesley