Calculations in Pawn
#1

Hello everyone,

pawn Код:
#define MAX_AUDIO_FILES 4

new Float:size = P[playerid][downloadedfiles] / MAX_AUDIO_FILES;
printf("%i,%f",P[playerid][downloadedfiles],size);
This function doesn't want to return numbers with comma's:

When P[playerid][downloadedfiles] = 1 then this functions returns 0 instead of 0.25,
When P[playerid][downloadedfiles] = 2 then this functions returns 0 instead of 0.50,
When P[playerid][downloadedfiles] = 3 then this functions returns 0 instead of 0.75,
when P[playerid][downloadedfiles] = 4 then it returns 1

Does anybody know how to fix this?

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)