Scripting: 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: Scripting: unexpected end of file (/thread-16744.html) |
Scripting: unexpected end of file - drunkmonk - 07-05-2012 Hi everyone, i'm having some trouble with the script for one of my maps and I don't know what the problem is. When ever I try to test it, I get an error message saying ERR: unexpected end of file. This is my script void OnStart() { SetPlayerLampOil(0); FadeOut(0); FadeIn(5); AddTimer("", 3.0, "Begin"); AddEntityCollideCallback("Player", "Monster_Spawn", "monsterspawn", true, 1); } void Begin(string &in asTimer) { SetMessage("Messages", "Setting", 0); } void monsterspawn(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); StartPlayerLookAt("servant_grunt_1", 10, 10, ""); AddTimer("", 2.0, "StopLook); AddTimer("", 3.0, "MonsterPath"); PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); } void StopLook(string &in asTimer) { StopPlayerLookAt(); } void MonsterPath(string &in asTimer) { AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, ""); AddEntityCollideCallback("servant_grunt_1", "Monster_Path", "NewPath", true, 1); } void NewPath(string &in asParent, string &in asChild, int alState) { ClearEnemyPatrolNodes("servant_grunt_1"); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, ""); AddEntityCollideCallback("servant_grunt_1", "Grunt_Open_Doors", "OpenDoors", true, 1); } void OpenDoors(string &in asParent, string &in asChild, int alState) { AddPropImpulse("cabinet_simple_1", -10.0, 0, 0, "World"); } void OnLeave() { } RE: Scripting: unexpected end of file - Adny - 07-05-2012 AddTimer("", 2.0, "StopLook"); wasn't declared, fixed now; you missed a quotation mark. RE: Scripting: unexpected end of file - drunkmonk - 07-05-2012 (07-05-2012, 12:48 AM)andyrockin123 Wrote: AddTimer("", 2.0, "StopLook");Well isn't that just a little embarrissing lol. It works great now, thank you very much! RE: Scripting: unexpected end of file - Adny - 07-05-2012 (07-05-2012, 12:51 AM)drunkmonk Wrote: Well isn't that just a little embarrissing lol. It works great now, thank you very much!No problem; I know its always nice to have a second pair of eyes look over something! |