12.06.2017, 14:26
Quote:
You're checking if the parameter is a string and in the next sscanf line you're checking if it's an integer. It can't be string and integer at the same time.
Use optional parameters Код:
if(sscanf(params,"s[50]I(-1)", choice,choice2) If a person uses take order but doesn't give a value for choice2 , it defaults to -1. However if they choose a valid number the remaining codes are executed. Also remove the second sscanf line. |
Ez pz lemon sqz