Weird error... - 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: Weird error... (/thread-14161.html) Pages:
1
2
|
Weird error... - Saren - 03-22-2012 Okay so I get this weird error when I tried to do a script but the weird thing is, it worked fine before.. now it says alooooot of weird stuff that makes no sense, here's my script void OnStart() { AddUseItemCallback("", "Prisonkey", "prisondoor", "UsedKeyOnDoor", true); AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddUseItemCallback("", "stone_hammer_chipper", "cell_breakable_wall_1", "BreakWall", false); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("prisondoor", false, true); PlaySoundAtEntity("", "unlock_door", "prisondoor", 0, false); RemoveItem("Prisonkey"); } //Prison brute void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_brute", true); AddEnemyPatrolNode("servant_brute", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_6", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_7", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_8", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_9", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_10", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_11", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_12", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_13", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_14", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_15", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_16", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_17", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_18", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_19", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_20", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_21", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_22", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_23", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_24", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_25", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_26", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_27", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_28", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_29", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_30", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_31", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_32", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_33", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_34", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_35", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_36", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_37", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_38", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_39", 0, ""); AddEnemyPatrolNode("servant_brute", "PathNodeArea_40", 0, ""); } void Despawnservant_brute(string &in asParent , string &in asChild , int alState) { SetEntityActive("servant_brute", false); } //Cell wall void BreakWall(string &in asItem, string &in asEntity) { SetSwingDoorLocked("cell_breakable_wall_1", false, true); PlaySoundAtEntity("", "03_break_wall", "cell_breakable_wall_1", 0, false) SetEntityActive("cell_breakable_wall_1", false); SetEntityActive("cell_breakable_wall_broken_1", true); } void OnLeave() { } Basically, it's those 2 lines the script dose'nt like for some reason... RE: Weird error... - pandasFTW - 03-22-2012 can you tell me what the error says??? RE: Weird error... - Saren - 03-22-2012 (03-22-2012, 11:49 AM)pandasFTW Wrote: can you tell me what the error says???indeed, if you can make sense of this, you GOT to be some kind of new Einstein... lol ExecuteString (1,1) ERR: No matching signatures to 'PlayMusic(string@&, const uint)' ExecuteString (1,1) ERR: No matching signatures to 'StopMusic(string@&, const uint)' 'StopMusic(string@&, string@& const uint)' main (69,1) ERR Expected ';' As you can see, makes no sense, I don't even use music.... O.o RE: Weird error... - Obliviator27 - 03-22-2012 You may have clashing names with the .hps file and another one from a different custom story, or those lines may be hidden elsewhere. Otherwise, your PlaySoundAtEntity line is incorrect, as it should be PlaySoundAtEntity("", "03_break_wall.snt, "cell_breakable_wall_1", 0, false); Where the bolded lines are what I changed. RE: Weird error... - Saren - 03-22-2012 (03-22-2012, 12:16 PM)Obliviator27 Wrote: You may have clashing names with the .hps file and another one from a different custom story, or those lines may be hidden elsewhere. Otherwise, your PlaySoundAtEntity line is incorrect, as it should bePut in the .snt but no diffrence... RE: Weird error... - Obliviator27 - 03-22-2012 You probably missed the semicolon at the end. Not sure if you're still getting the PlayMusic error. Perhaps in a previous .hps with it in OnLeave? RE: Weird error... - Saren - 03-22-2012 (03-22-2012, 12:32 PM)Obliviator27 Wrote: You probably missed the semicolon at the end. Not sure if you're still getting the PlayMusic error. Perhaps in a previous .hps with it in OnLeave?It is the same, yes but yea, it's the same ending as this 1 void OnLeave() { } RE: Weird error... - Saren - 03-26-2012 Soo, no one can help? RE: Weird error... - SilentStriker - 03-26-2012 you have forgot a semicolon on PlaySoundAtEntity RE: Weird error... - Saren - 03-26-2012 (03-26-2012, 08:11 AM)SilentStriker Wrote: you have forgot a semicolon on PlaySoundAtEntityAaaah yea, I see it, thx bro |