SA-MP Forums Archive
Help with format.. - 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: Help with format.. (/showthread.php?tid=183633)



Help with format.. - The_Moddler - 16.10.2010

pawn Код:
format(string, 64, "%d", kills[playerid]/deaths[playerid]);
Why that doesn't work?

It gives me "Server unknown command"..

I want to divide kills into deaths..

Thanks


Re: Help with format.. - Babul - 16.10.2010

did this help you?
https://sampforum.blast.hk/showthread.php?tid=183547


Re: Help with format.. - Austin - 16.10.2010

pawn Код:
format(string, sizeof(string), "%d", kills[playerid]/deaths[playerid]);
I think using sizeof makes more sense.


Respuesta: Re: Help with format.. - The_Moddler - 18.10.2010

Quote:
Originally Posted by Babul
Посмотреть сообщение
Nah, it didn't, dont post for post count..

The problem was that deaths was zero and kills too, so the result was zero.

I had to use floatdiv.


Re: Help with format.. - Babul - 18.10.2010

a post for trying to help someone who is not able to solve a problem on his own > 2 posts for asking basically the same thing again, nor answering if it helped or not.
well iam not going to help you anymore. this will keep my post count on my used-to decent low niveau i guess?
edit: if you solved the basics of math, then you should know that dividing /0 is impossible, but who cares? you surely dont ^^


Respuesta: Help with format.. - The_Moddler - 18.10.2010

You've got serious problems for reading and understanding, read the post again and compare

Actually, zero divided by zero is possible.. look around kid