Your NPC needs to have something in his "Default Dialogue" field on his sidebar so the game knows to allow you to request dialogue. Usually I just type "Default" into it, the script will assign the correct dialogue when it's time.
This is most likely your issue, because I've run into it myself and I was stumped for a while - lol
Make sure that's done as well. Most NPCs have something there without making a change, but some don't. If the code compiles you're well on your way.
As for the code, I copy pasted it directly from my own mod that does work, so the issue wasn't with the code. In fact, switching the orders around will cause issues (it will compile, but you'll have bugs - maybe not for a space, but any other way will cause issues!)
Last edited by Burgee; 14/11/14 04:34 PM.