Calc money with distance
#1

hey,
I'm making a mission with some checkpoints.
and i want to now the distance between the end(its a random spot(all the time)) and the begin(this is only 1 place)

i have this
Код:
new Float:Dis = floatround(GetDistanceToPoint(playerid, 1461.60083, -1024.28356, 23.828125), floatround_round);
Money = (Dis * 100);
but ill get this warning;
Код:
(94) : warning 213: tag mismatch
*line 94 = "Money = (Dis * 100);"

what is wrong with it?
"Floatround" makes a integer from a float doesn't it? :S

thanks anyway
Reply
#2

Dis is a float...

Do this

pawn Код:
new Dis = floatround(GetDistanceToPoint(playerid, 1461.60083, -1024.28356, 23.828125), floatround_round);
Money = Dis * 100;
Also, floatround makes a float to a integer.
Reply
#3

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Dis is a float...

Do this

pawn Код:
new Dis = floatround(GetDistanceToPoint(playerid, 1461.60083, -1024.28356, 23.828125), floatround_round);
Money = Dis * 100;
Also, floatround makes a float to a integer.
OMG that a fail of me :S

thanks! ill go and check it out now... TY
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)