Please copy the full text of the error message and paste it here.

Where is the variable ticket defined?