Why is my custom story not working!?!?!? - 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: Why is my custom story not working!?!?!? (/thread-19414.html) Pages:
1
2
|
Why is my custom story not working!?!?!? - Gamerlord08 - 12-02-2012 hello users, i am experiencing a problem with my custom story, it says when i boot up, "Unexpected end of file" i am very, VERY new to coding, so i might have a obvious flaw somewhere, but i cannot find it, here it is: /////////////////////// // Run when entering map void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true); AddEntityCollideCallBack("Player", "PlayerCollide", MonsterFunction", true, 1); AddEntityCollideCallBack("Player", "MonsterEnd", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alstate); { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, ""); } ////////////////////// // Run when leaving map void OnLeave() if you can, please help me, i just want to make a little custom story is all. RE: Why is my custom story not working!?!?!? - Unearthlybrutal - 12-02-2012 /////////////////////// // Run when entering map void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true); AddEntityCollideCallBack("Player", "PlayerCollide", MonsterFunction", true, 1); AddEntityCollideCallBack("Player", "MonsterEnd", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alstate); { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, ""); } ////////////////////// // Run when leaving map void OnLeave() { } RE: Why is my custom story not working!?!?!? - The chaser - 12-02-2012 /////////////////////// // Run when starting map void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true); AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddEntityCollideCallback("Player", "MonsterEnd", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState); { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, ""); } ////////////////////// // Run when leaving map void OnLeave() { } Unearthlybrutal pls. There were some missing (") that you didn't notice. RE: Why is my custom story not working!?!?!? - Rapture - 12-02-2012 ^ Highlight the area you fixed next time please! He fixed your AddEntityCollideCallBack("Player", "PlayerCollide", "MonsterFunction", true, 1); RE: Why is my custom story not working!?!?!? - Gamerlord08 - 12-02-2012 well a fatal error keeps telling me that at 11, ""void MonsterFunction(string &in asParent, string &in asChild, int alState); {"" there's a unexpected token {, i'm VERY positive that's supposed to be there. RE: Why is my custom story not working!?!?!? - Rapture - 12-02-2012 Did you fix up both errors that Unearthlybrutal & The Chaser pointed out? And you should keep the grunt names exactly the same in the hps, the "G or g" in Grunt should be the same as the one in the your map also. RE: Why is my custom story not working!?!?!? - Damascus - 12-02-2012 You placed a ; at the end that shouldn't be there. It should be: void MonsterFunction(string &in asParent, string &in asChild, int alState) { RE: Why is my custom story not working!?!?!? - Gamerlord08 - 12-02-2012 alright, it says no matching sginatures to the callback's, odd. i went and checked if they matched perfectly, and they check out. but they still say there's no matching sigs. but, if i add that ; to void monsterfunction, it then says unexpected token. RE: Why is my custom story not working!?!?!? - The chaser - 12-02-2012 (12-02-2012, 09:24 PM)Gamerlord08 Wrote: alright, it says no matching sginatures to the callback's, odd. i went and checked if they matched perfectly, and they check out. but they still say there's no matching sigs. but, if i add that ; to void monsterfunction, it then says unexpected token.void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true); AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddEntityCollideCallback("Player", "MonsterEnd", "THERE IS A MISSING CALLBACK IN HERE" true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, ""); } ////////////////////// // Run when leaving map void OnLeave() { } RE: Why is my custom story not working!?!?!? - Gamerlord08 - 12-02-2012 im sorry chaser, but i still don't understand what that means, i know there's a missing thing there, but what do i replace it with? what do i do with it? i have no clue why it dosen't work the way it is now, like i said, VERY new. Alright, i changed it to this and added a callbackfunc to the monster, /////////////////////// // Run when starting map void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true); AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddEntityCollideCallback("Player", "MonsterEnd", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, ""); } ////////////////////// // Run when leaving map void OnLeave() { } but it still says no sig, WHY, there is a signature on the monster now! |