sscanf command problem
#10

Well think about what you're comparing for a second, look at this:

pawn Код:
if(equal(params,"buy"))
So you type "/v buy", then obviously params and buy match, so that if statement returns true, then it continues down into your sscanf check and sscanf says there's no second integer parameter, and it returns the message. So then you type "/v buy 50", then it goes to compare params and "buy" again, and it's no longer going to return true, because now params contains "buy 50".

So what can you do? Well actually you pretty much already have it solved, you just need to change one little thing:

pawn Код:
if(equal(choice,"buy"))
Hope that explains it and helps.
Reply


Messages In This Thread
sscanf command problem - by oliverrud - 12.02.2011, 18:55
Re: sscanf command problem - by Hiddos - 12.02.2011, 18:57
Re: sscanf command problem - by oliverrud - 12.02.2011, 19:02
Re: sscanf command problem - by Gh0sT_ - 13.02.2011, 02:15
Re: sscanf command problem - by oliverrud - 13.02.2011, 02:23
Re: sscanf command problem - by Unknown123 - 13.02.2011, 02:36
Respuesta: sscanf command problem - by Chιrι - 13.02.2011, 02:58
Re: sscanf command problem - by Hal - 13.02.2011, 03:03
Re: Respuesta: sscanf command problem - by oliverrud - 13.02.2011, 11:18
Re: sscanf command problem - by JaTochNietDan - 13.02.2011, 18:21

Forum Jump:


Users browsing this thread: 4 Guest(s)