Silly question
#1

Hi, I got a rather easy question right here. So, I'm trying to scan the input lotto number and print it out.
Here's the code:
Код:
COMMAND:lotto(playerid, params[])
{
new Number;
sscanf(params, "d", Number);
if(Number < 1)
{
     SendClientMessage(playerid, 0x10F441AA, "USAGE: /lotto (1-100)");
     return 1;
}
if(Number > 100)
{
     SendClientMessage(playerid, 0x10F441AA, "USAGE: /lotto (1-100)");
     return 1;
}
SendClientMessage(playerid, 0x10F441AA, "Your lotto number is: %d");
SendClientMessage(playerid, 0x10F441AA, "You have purchased a lotto ticket!");
SendClientMessage(playerid, 0x10F441AA, "Wait for the draw.. Good luck!");

return 1;
}
However, it doesn't print out my input, like 1,2 or whatever. It prints some weird stuff like 1951519. Why's that?
Reply


Messages In This Thread
Silly question - by iRenegade - 09.01.2013, 19:30
Re: Silly question - by RedCrossER - 09.01.2013, 19:33
Re: Silly question - by iRenegade - 09.01.2013, 19:34
Re: Silly question - by RedCrossER - 09.01.2013, 19:38
Re: Silly question - by iRenegade - 09.01.2013, 19:40
Re: Silly question - by RedCrossER - 09.01.2013, 19:43

Forum Jump:


Users browsing this thread: 4 Guest(s)