tag mismatch while deviding floats - 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)
+--- Thread: tag mismatch while deviding floats (
/showthread.php?tid=491588)
tag mismatch while deviding floats -
[WSF]ThA_Devil - 31.01.2014
Solved it, the problem was obviously my stupidness writing: new float instead of new Float
reply to pds2k12:
dividing integers don't make integer in the end, not most of the time. so it's better to have float there...
Re: tag mismatch while deviding floats -
Konstantinos - 31.01.2014
pawn Код:
new Float: daycount = floatdiv((banexpiretime - gettime()), 86400);
Re: tag mismatch while deviding floats -
[WSF]ThA_Devil - 31.01.2014
Still gives me the warning tho'...
Jesus... why'd i write new float ( with little f) ?
Re: tag mismatch while deviding floats - Patrick - 31.01.2014
gettime returns in unix(integer) not in
Float, also there is difference between
float and
Float.
pawn Код:
Float | float
Float: FF | fF
float: Ff | ff
Stronger: FF
pawn Код:
new daycount, time;
time = gettime();
daycount = ( banexpiretime - time / 86400 );
Re: tag mismatch while deviding floats -
BroZeus - 31.01.2014
i dont think thats the correct usage of gettime() see this for correct usage of it--
https://sampwiki.blast.hk/wiki/Gettime