sscanf strings with spaces
#1

I wanted to make a /voting command that would go like /voting <title> <option1> <option2> but I don't know how to make it so that there can be spaces in title and the options, like for example: /voting "Do you like me?" "Yes I do" "No I don't". Is it possible using sscanf?
Reply
#2

Use Dialogs with the input style. My suggestion.

Jeffry
Reply
#3

I think only with delimiters
pawn Код:
new title[24],option1[64],option2[64]
sscanf(cmdtext,"p<->s[24]s[64]s[64]",title,option1,option2)
/voting Do you like me?-Yes I do-No I don't
Reply
#4

Quote:
Originally Posted by Jefff
Посмотреть сообщение
I think only with delimiters
pawn Код:
new title[24],option1[64],option2[64]
sscanf(cmdtext,"p<->s[24]s[64]s[64]",title,option1,option2)
/voting Do you like me?-Yes I do-No I don't
Would be an option as well. Didn't know that sscanf has such a function, never been using it. ^^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)