ERROR: Unexpected end of file - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: ERROR: Unexpected end of file (/thread-10855.html) |
ERROR: Unexpected end of file - Wickedwrath - 10-19-2011 Hello! I need some help here with this script. It says "Unexpected end of file" and I just can't figure out what's wrong. Can anyone help and solve this, please? Quote: //////////////////////////// RE: ERROR: Unexpected end of file - jens - 10-19-2011 PHP Code: //////////////////////////// There was a } missing, I added a comment in the code at the location. RE: ERROR: Unexpected end of file - Wickedwrath - 10-19-2011 (10-19-2011, 03:10 PM)jens Wrote:Hm.. Strange. It's still not working. (I also deleted your "// <- THERE WAS A } MISSING."-text) and still not working. RE: ERROR: Unexpected end of file - jens - 10-19-2011 Can't see anything that would cause an unexpected end of file. usually it is a {} )( ;, " that is missing or incorrect positioned. RE: ERROR: Unexpected end of file - Wickedwrath - 10-19-2011 (10-19-2011, 03:32 PM)jens Wrote: Can't see anything that would cause an unexpected end of file. usually it is a {} )( ;, " that is missing or incorrect positioned.Hm.. I solve it by removing: Code: PlaySoundEntity("", "unlock_door", "metal_1", 0, false); RE: ERROR: Unexpected end of file - jens - 10-19-2011 Ah, that should be PlaySoundAtEntity not PlaySoundEntity! RE: ERROR: Unexpected end of file - Wickedwrath - 10-19-2011 (10-19-2011, 03:36 PM)jens Wrote: Ah, that should be PlaySoundAtEntity not PlaySoundEntity!I tryed to change it, but then I got the error again (unexpected end of file). The strange thing is, that when I remove the whole "PlaySoundAtEntity("", "unlock_door", "metal_1", 0, false);", it still gives me a "key sound". Is it supose to do that? (10-19-2011, 03:36 PM)jens Wrote: Ah, that should be PlaySoundAtEntity not PlaySoundEntity!Ah, I got it to work now, with your "PlaySoundAtEntity"-script! I don't know what went wrong.. Thank you! RE: ERROR: Unexpected end of file - death5657 - 03-17-2013 Hi im stuck to and really don't know what to do can you help me??? all it says main (25,15) : ERR : Expected "{" hear is my hps file: //////////////////////////// // Run first time starting map void OnStart() { AddUseItemCallback("", "K_1", "door_1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("door_1", false, true); PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0, false); RemoveItem("K_1"); } ///////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() RE: ERROR: Unexpected end of file - PutraenusAlivius - 03-17-2013 You are missing the { and } at void OnLeave(). |