Let's say I have the following strings and a boolean:
bool numberGiven = false
"@give chocolate"
"@give white chocolate"
"@give dark chocolate"
"@give white chocolate 10"
"@give dark chocolate 2"
I want to save the words together in a char[] and the integer seperately as int using sscanf.
I want that the number is an optional input. Users do not have to type in a number but if they do, the boolean "numberGiven" will become "true".
I need an if statement to decide whether or not I have to make numberGiven "true". Note that the "item name" can be even more than just two words. Instead of dark chocolate it could be Kinder Schokolade Dark Chocolate for example (and of course the optional integer at the end)