FATAL 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: FATAL ERROR (/thread-8914.html) Pages:
1
2
|
FATAL ERROR - Zypherzemus - 07-02-2011 Can someone please help?? I keep getting this error:[attachment=1622] RE: FATAL ERROR - xtron - 07-02-2011 Please show uss your script file (Dormitry.hps). The problem is inside of it. RE: FATAL ERROR - Zypherzemus - 07-02-2011 ///////////////////////////// // Run first time starting map void OnStart() { PlayMusic("12_amb.ogg", true, 100.0, 0.0, 1, true); } { AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest", true, 1); void GetKeyQuest(string &in asParent, string &in asChild, int alState) { AddQuest("keyquest", "KeyQuest"); } AddEntityCollideCallback("Player", "Key_Complete_Area", "FinishKeyQuest", true, 1); void FinishKeyQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("keyquest", "KeyQuest"); } //////////////////////////// // Run when entering map void OnEnter() { AddUseItemCallback("", "eastwingkey_1", "eastwingdoor", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("eastwingdoor", false, true); PlaySoundAtEntity("", "unlock_door", "eastwingdoor", 0, false); RemoveItem("eastwingkey_1"); } //////////////////////////// // Run when leaving map void OnLeave() { } I kinda edited it to see if I could fix the problem on my own. That's why it looks like so. Now the Error is: main (8,1): ERR: Unexpected token '{' RE: FATAL ERROR - Tanshaydar - 07-02-2011 { is being used to open code blocks and } is used to close those blocks. Every block need to have a name, which means you cannot do something like this { something } You have to do like this void SomeFunction( SomeInput) { something } Also, your collide and use call backs need to be in OnStart block. RE: FATAL ERROR - finosi - 07-02-2011 And remember, it is easier for you if you edit the script while the map is open Like it says here http://wiki.frictionalgames.com/hpl2/tutorials/script/entihscript_beginner in : "Open the Map in Amnesia BEFORE you Edit Script!" RE: FATAL ERROR - Zypherzemus - 07-02-2011 Thanks guys, I got it to work again.. But I just ran into another error >:/ FATAL ERROR main: (24,1): ERR: No matching signatures to: 'SetPlayerLookAt(string@&, const float, const float, string@&); ///////////////////////////// // Run first time starting map void OnStart() { PlayMusic("07_amb.ogg", true, 100.0, 0.0, 1, true); AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest", true, 1); AddEntityCollideCallback("Player", "Key_Complete_Area", "FinishKeyQuest", true, 1); AddEntityCollideCallback("Player", "Grunt_Area", "CollideGruntDoor", true, 1); } void GetKeyQuest(string &in asParent, string &in asChild, int alState) { AddQuest("keyquest", "KeyQuest"); } void FinishKeyQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("keyquest", "KeyQuest"); } void CollideGruntDoor(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("eastwingdoor", true, true); SetPlayerLookAt("eastwingdoor", 10.0f, 10.0f, ""); AddTimer("", 1.0f, "stoplook"); } void stoplook(string &in asTimer) { StopPlayerLookAt(); } //////////////////////////// // Run when entering map void OnEnter() { AddUseItemCallback("", "eastwingkey_1", "eastwingdoor", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("eastwingdoor", false, true); PlaySoundAtEntity("", "unlock_door", "eastwingdoor", 0, false); RemoveItem("eastwingkey_1"); } //////////////////////////// // Run when leaving map void OnLeave() { } I'm sorry if this is getting annoying in any way, I'm 'kinda' new to this, I took scripting classes (somewhat) over the summer a few years ago and completely forgot everything :P so yeah. Thanks for the help! RE: FATAL ERROR - Roenlond - 07-02-2011 SetPlayerLookAt("eastwingdoor", 10.0f, 10.0f, ""); should be StartPlayerLookAt("eastwingdoor", 10.0f, 10.0f, ""); RE: FATAL ERROR - Zypherzemus - 07-02-2011 PHP Code: ///////////////////////////// 'No matching signatures' signatures don't match? I honestly believe this .hps file hates my guts .-. RE: FATAL ERROR - Roenlond - 07-02-2011 No matching signatures means that you either spelled or typed something wrong. For example: Playmusic instead of PlayMusic or that you are missing a boolean value/integer/string/float somewhere. in a command. AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest"); would give an error as it should have two more columns, for example. RE: FATAL ERROR - Zypherzemus - 07-02-2011 (07-02-2011, 11:06 PM)Roenlond Wrote: No matching signatures means that you either spelled or typed something wrong. For example: Playmusic instead of PlayMusic or that you are missing a boolean value/integer/string/float somewhere. in a command. I understand that now, but as I looked over the script, I couldn't find anything wrong, if anything, it would most likely be the floats in row 26 and 28 since that's where the error ocurred. |