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: Unexpected end of file (/thread-9701.html) |
Unexpected end of file - rybray - 08-11-2011 I get the error saying that there is an unexpected end to my file. Could someone point out my error, I cannot find it. ///////////////////////////////// // Run first time starting map void OnStart() { AddEntityCollideCallback("Player", "DoorAreaOne", "CollideDoorOne", true, 1); } void CollideDoorOne(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("cellar_wood01_slow_1", true, true); } //////////////////////////////// // Run when entering map void OnEnter() { AddUseItemCallback("", "DoorKey, "castle_arched01_1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("castle_arched01_1", false, true); PlaySoundAtEntity("", "unlock_door", "castle_arched01_1", 0, false); RemoveItem("DoorKey"); } //////////////////////////////// // Run when leaving map void OnLeave() { } RE: Unexpected end of file - graykin - 08-11-2011 In your OnEnter() function, you forgot to close DoorKey with a quotation mark. It should look like: AddUseItemCallback("", "DoorKey", "castle_arched01_1", "UsedKeyOnDoor", true); It's always the little things RE: Unexpected end of file - rybray - 08-11-2011 (08-11-2011, 03:52 AM)graykin Wrote: In your OnEnter() function, you forgot to close DoorKey with a quotation mark. And to think I stared at this tiny script for 15 minutes, up and down. Thank you. RE: Unexpected end of file - graykin - 08-11-2011 No prob. I've made that mistake enough times that I know what to look for. |