Math problem
#4

Quote:
Originally Posted by ProjectMan
Посмотреть сообщение
pawn Код:
new Float:speed = GetVSpeed(playerid); //Float
new Float:newdist = speed / 3600.0;
There you go. You defined speed as an integer first which you were dividing by a float which is not possible. Either you need to use cast functions to change int into float or you can simply make speed var as a float. Just like this poster quoted. Problem solved!

EDIT:

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
pawn Код:
new Float:speed = GetVSpeed(playerid); //Float
new Float:newdist = speed / 3600.0;
Also put 3600.0 as float.
To prevent warnings about tag mismatches and to be certain you're dividing a float by a float.
Yeah ofcourse my bad. Thanks to PPC for the help.
Reply


Messages In This Thread
Math problem - by Redirect Left - 21.01.2014, 03:10
Re: Math problem - by SickAttack - 21.01.2014, 04:13
Re: Math problem - by ProjectMan - 21.01.2014, 05:17
Re: Math problem - by Ballu Miaa - 21.01.2014, 06:00
Re: Math problem - by PowerPC603 - 21.01.2014, 06:05
Re: Math problem - by Redirect Left - 21.01.2014, 11:45

Forum Jump:


Users browsing this thread: 1 Guest(s)