31.01.2014, 02:00
While 'n' is number, people will only really be inputting integers, so you may as well change it to 'i'.
Asides from that, to get to the actual problem, 'params' includes EVERYTHING after the command, including the 'joinrank' 'sub-command'. You haven't shown the entire command so I'm not sure what it's meant to be, but for example '/set joinrank <rank>', you're passing the entire 'params' string in to sscanf, which includes the 'joinrank' part of the string.
Asides from that, to get to the actual problem, 'params' includes EVERYTHING after the command, including the 'joinrank' 'sub-command'. You haven't shown the entire command so I'm not sure what it's meant to be, but for example '/set joinrank <rank>', you're passing the entire 'params' string in to sscanf, which includes the 'joinrank' part of the string.