I was browsing the creation kit wiki when I found this page
http://www.creationkit.com/Papyrus_Compiler_Errors
"Missing X at 'Y'"
The compiler expected X, but found Y instead. This can usually be the result of a misspelled keyword, or malformed line.
your message being : missing EOF at 'EndFunction' it would maybe indicate that you have a EndFunction line all by itself (I mean not linked to any Function line).
Indenting your code like this
Function xyz blah-blah blah-blah2 blah-blah3EndFunction
will help you spot any problem.
Hmm you hooked up your quest as a Change Location Quest and hooked it up in the Story Manager right?
I think this is necessary only when you want to
start your quest with a particular event not for a particular script inside this quest.
also I think your test is not valid. You should get something
Location property ValleyOfDeadNature autoEvent OnLocationChange(Location akOldLoc, Location akNewLoc) if (Game.GetPlayer().GetCurrentLocation() == ValleyOfDeadNature) Debug.Trace("The Player has entered Valley of Dead Nature !") ;put your code here endIfendEventand set the value for ValleyOfDeadNature in the editor (see tutorials in the CK wiki).