Sscanf question.
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
As it is, "name" will contain the whole of the rest of the string. Do something like this:

pawn Код:
sscanf(params, "is[20]S(no)[20]", vehicleID, name, confirm)
That makes the confirmation optional, with a default of "no", so if you do:

pawn Код:
if (strcmp(confirm, "yes") == 0)
Then you know they must have typed the extra bit.
Ah, now I understand. Thanks alot!
Reply


Messages In This Thread
Sscanf question. - by Kebab- - 03.11.2014, 14:26
Re: Sscanf question. - by HY - 03.11.2014, 14:39
Re: Sscanf question. - by Rudy_ - 03.11.2014, 14:40
Re: Sscanf question. - by Kebab- - 03.11.2014, 15:17
Re: Sscanf question. - by Kebab- - 03.11.2014, 15:22
Re: Sscanf question. - by Stinged - 03.11.2014, 15:26
Re: Sscanf question. - by Kebab- - 03.11.2014, 19:46
Re: Sscanf question. - by Kebab- - 03.11.2014, 21:36

Forum Jump:


Users browsing this thread: 1 Guest(s)