sscanf multiple optional parameters
#3

Thanks for the reply but I found an alternative to what you suggested. It's probably bad practice or something but I used this:
pawn Код:
if(sscanf(params, "s[12]I(-1)I(-1)", task, id, hour))
after:
pawn Код:
else if(!strcmp(task, "openingtime", true))
and
pawn Код:
else if(!strcmp(task, "closingtime", true))
So essentially skipped the name parameter when I knew what task they had typed. It ends up assigning the hour to both the name parameter and hour parameter.
Reply


Messages In This Thread
sscanf multiple optional parameters - by Finn707 - 02.06.2015, 19:00
Re: sscanf multiple optional parameters - by Jefff - 02.06.2015, 19:20
Re: sscanf multiple optional parameters - by Finn707 - 02.06.2015, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)