Is that line the problem?
Is this the input?
Where does the value: "p fire" come from? It looks like it came from the first line of the input, skipping over the #ty

The code should check for...