Help with format..
#1

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
Reply
#2

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

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

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.
Reply
#5

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 ^^
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)