Fatal Error: Expected "(" - 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 (https://www.frictionalgames.com/forum/forum-35.html) +---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-37.html) +---- Thread: Fatal Error: Expected "(" (/thread-23410.html) |
Fatal Error: Expected "(" - Shelancer45 - 09-27-2013 As the title says, Fatal Error: Could not load script file main (3,10) : ERR : Expected "(" Here is the HTP: void OnStart() { void TimerBlackOut(string &in asTimer) { AddLocalVarInt("BlackoutStep", 1); float fEventSpeed = 0.5f; switch(GetLocalVarInt("BlackoutStep")) { case 1: FadeIn(4); FadeImageTrailTo(2,1); SetPlayerActive(true); ShowPlayerCrossHairIcons(true); SetPlayerMoveSpeedMul(0.05f); SetPlayerLookSpeedMul(0.05f); fEventSpeed = 3.0f; break; case 2: FadePlayerRollTo(85, 1, 1); break; case 3: FadeImageTrailTo(0,1); FadePlayerRollTo(65, 1, 1); break; case 4: PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 2, false); FadeOut(2); fEventSpeed = 1.5f; break; case 5: FadePlayerRollTo(85, 1, 4); break; case 6: FadeImageTrailTo(1.8f,1.5f); FadePlayerFOVMulTo(1.25f, 0.01); break; case 7: FadePlayerRollTo(45, 1, 2); FadeIn(2); fEventSpeed = 1.5f; break; case 8: FadePlayerRollTo(15, 1, 2); FadePlayerFOVMulTo(0.75f, 0.01); break; case 9: PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1.5f, false); FadeOut(1); FadePlayerRollTo(50, 1, 2); fEventSpeed = 2.0f; break; case 10: SetPlayerMoveSpeedMul(0.1f); SetPlayerLookSpeedMul(0.1f); FadePlayerFOVMulTo(1.1f, 0.01); FadeImageTrailTo(0,1.5f); fEventSpeed = 1.5f; break; case 11: SetPlayerMoveSpeedMul(0.2f); SetPlayerLookSpeedMul(0.2f); FadePlayerRollTo(-15, 1, 2); FadeIn(1); fEventSpeed = 2.0f; break; case 12: SetPlayerMoveSpeedMul(0.3f); SetPlayerLookSpeedMul(0.4f); FadePlayerRollTo(-30, 10, 60); MovePlayerHeadPos(0, 0, 0, 1, 0.5f); FadePlayerFOVMulTo(0.9f, 0.01); FadeImageTrailTo(1.5,2); PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false); break; case 13: SetPlayerMoveSpeedMul(0.4f); SetPlayerLookSpeedMul(0.6f); FadePlayerRollTo(10, 10, 20); MovePlayerHeadPos(0, -0.5f, 0, 1, 0.5f); break; case 14: SetPlayerMoveSpeedMul(0.5f); SetPlayerLookSpeedMul(0.8f); FadePlayerRollTo(0, 10, 60); MovePlayerHeadPos(0, 0, 0, 1, 0.5f); FadePlayerFOVMulTo(1, 0.01f); PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false); fEventSpeed = 2.0f; break; case 15: SetPlayerJumpDisabled(false); SetPlayerCrouchDisabled(false); SetPlayerMoveSpeedMul(0.6f); SetPlayerLookSpeedMul(1.0f); FadeImageTrailTo(0,0.2f); PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1, false); fEventSpeed = 1.0f; break; } } } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } I am at a loss as to what to do to fix the problem. If I could get some fresh eyes to spot the issue that'd be fantastic. RE: Fatal Error: Expected "(" - Kreekakon - 09-27-2013 You cannot put another function inside another function, like what you did with void TimerBlackOut(string &in asTimer) Also, you didn't even define the timer yet at all, which means leaving TimerBlackOut on its own will not do anything. |