One critical matter to put into consideration: the $2 can be anything that people enter, so you need to make sure it is a number and nothing else by making an if check:
if ($2 !isnum) { msg # 4 Usage: !ticketprice price }
Unless, of course, you mean prize, not price. There is a difference between these two words.