[SCRIPT] script function - 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: [SCRIPT] script function (/thread-12399.html) |
script function - ZyLogicX - 01-06-2012 Im getting an error which states: "main: (1,733) ERR: A function with the same name and parameters already exist." This is the script... void OnEnter() { } void OnStart() { AddEntityCollideCallback("Player", "WTH_Quest_Area", "GetWTHQuest", true, 1); AddEntityCollideCallback("Player", "WTH_Complete_Area", "FinishWTHQuest", true, 1); AddEntityCollideCallback("Player", "Wonder_Quest_Area", "GetWonderQuest", true, 1); AddEntityCollideCallback("Player", "Wonder_Complete_Area", "FinishWonderQuest", true, 1); } void GetWTHQuest(string &in asParent, string &in asChild, int alState) { AddQuest("wthquest", "WthQuest"); } void FinishWTHQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("wthquest", "WthQuest"); } void GetWonderQuest(string &in asParent, string &in asChild, int alState) { AddQuest("wonderquest", "WonderQuest"); } void FinishWTHQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("wonderquest", "WonderQuest"); } void OnLeave() { } RE: script function - Apjjm - 01-06-2012 You have declared two functions (of identical signature) with the same name: void OnEnter() { } void OnStart() { AddEntityCollideCallback("Player", "WTH_Quest_Area", "GetWTHQuest", true, 1); AddEntityCollideCallback("Player", "WTH_Complete_Area", "FinishWTHQuest", true, 1); AddEntityCollideCallback("Player", "Wonder_Quest_Area", "GetWonderQuest", true, 1); AddEntityCollideCallback("Player", "Wonder_Complete_Area", "FinishWonderQuest", true, 1); } void GetWTHQuest(string &in asParent, string &in asChild, int alState) { AddQuest("wthquest", "WthQuest"); } void FinishWTHQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("wthquest", "WthQuest"); } void GetWonderQuest(string &in asParent, string &in asChild, int alState) { AddQuest("wonderquest", "WonderQuest"); } void FinishWTHQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("wonderquest", "WonderQuest"); } void OnLeave() { } I am assuming the last part should read: void FinishWonderQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("wonderquest", "WonderQuest"); } RE: script function - ZyLogicX - 01-07-2012 Thats kind of stupid actually..... my mistake.... thanks |