Calc money with distance - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Calc money with distance (
/showthread.php?tid=161208)
Calc money with distance -
me-borno - 19.07.2010
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
Re: Calc money with distance -
[HiC]TheKiller - 19.07.2010
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.
Re: Calc money with distance -
me-borno - 19.07.2010
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