[SCRIPT] Unexpected end of file error problem :( - 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] Unexpected end of file error problem :( (/thread-24466.html) Pages:
1
2
|
Unexpected end of file error problem :( - Radical Batz - 01-26-2014 I don't get it! The code looks good for me, or maybe it's not in the hps file but it keeps getting me this error every time I keep loading my customs tory! This is the error --------------------------- FATAL ERROR --------------------------- FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! main (69, 17) : ERR : Unexpected end of file --------------------------- OK --------------------------- Here is my script file Code: void OnStart() I there is anyone who knows what's the problem or can guess where the error is, then pls help! thanks RE: Unexpected end of file error problem :( - The chaser - 01-26-2014 I see your error, change this: void UnlockDoor(string &in asEntity, int LeverState) { if(GetLeverState("Lever1") == -1 && GetLeverState("Lever2") == -1) GetLeverState("Lever3") == 1) GetLeverState("Lever4") == -1) { SetSwingDoorLocked("Door", false, true); PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false); } } For this: void UnlockDoor(string &in asEntity, int LeverState) { if(GetLeverState("Lever1") == -1) && GetLeverState("Lever2") == -1) GetLeverState("Lever3") == 1) GetLeverState("Lever4") == -1) { SetSwingDoorLocked("Door", false, true); PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false); } } RE: Unexpected end of file error problem :( - Radical Batz - 01-26-2014 It gets me this error instead --------------------------- FATAL ERROR --------------------------- FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! main (60, 1) : ERR : Expected expression value --------------------------- OK --------------------------- RE: Unexpected end of file error problem :( - The chaser - 01-26-2014 So, it's fixed? That "OK" confuses me. RE: Unexpected end of file error problem :( - RaideX - 01-26-2014 (01-26-2014, 09:18 PM)The chaser Wrote: So, it's fixed? That "OK" confuses me. I believe the "OK" is the Button from the error window RE: Unexpected end of file error problem :( - Romulator - 01-27-2014 PHP Code: if(GetLeverState("Lever1") == -1 Try that. It corrects the way the brackets are handled. RE: Unexpected end of file error problem :( - Radical Batz - 01-27-2014 (01-27-2014, 12:21 AM)Romulator Wrote: well now the error is telling me --------------------------- FATAL ERROR --------------------------- FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'! main (61, 1) : ERR : Expected ')' --------------------------- OK --------------------------- Expected ')', does that mean I did that symbol on somewhere where I'm not supposed to put it, I don't get it In my code I simply have not mispelled anything, did I? RE: Unexpected end of file error problem :( - PutraenusAlivius - 01-27-2014 No that means that particular symbol WAS SUPPOSED to be there, but it's not. In the error, the engine expects a ")", but nothing. RE: Unexpected end of file error problem :( - Radical Batz - 01-27-2014 (01-27-2014, 03:58 PM)JustAnotherPlayer Wrote: No that means that particular symbol WAS SUPPOSED to be there, but it's not. but I don't know where it's supposed to be, pls help RE: Unexpected end of file error problem :( - The chaser - 01-27-2014 Try this then: void UnlockDoor(string &in asEntity, int LeverState) { if(GetLeverState("Lever1") == -1) && (GetLeverState("Lever2") == -1) (GetLeverState("Lever3") == 1) (GetLeverState("Lever4") == -1) { SetSwingDoorLocked("Door", false, true); PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false); } } |