if you didnt set the %ticketprice, why dont use
if (!%ticketprice) { msg # 4 There is no ticket price set }
it will check, if there is any var called %ticketprice, if not, command