09.10.2015, 21:53
Quote:
Make sure to save the pin as a string because numbers that start with a zero will bug out.. like "0000" or "0123"..
It should be: PHP код:
And don't forget to change all instances of integer to a 4 digit string. |
You shouldn't use two sscanf strings for that. If you'd do it like I said it would be better. It's your code however, do as you will.
Now about the leading zero's. You shouldn't store it as a string to get them. You said:
Quote:
Weird, It works perfect now but if I set someone else or mine admin pin to "0000" the "SendClientMessage" displays "0". How to solve this? |
pawn Код:
printf("This number will have three leading zeros: %4i", 0);
//Output: "This number will have three leading zeros: 0000"
printf("These numbers will all be four digits, with leading zeros if needed: %4i, %4i, %4i", 12, 555, 045);
//Output: "These numbers will all be four digits, with leading zeros if needed: 0012, 0555, 0045"