Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal Error: Expected "("
Shelancer45 Offline
Junior Member

Posts: 1
Threads: 1
Joined: Sep 2013
Reputation: 0
#1
Fatal Error: Expected "("

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. Smile
09-27-2013, 04:08 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#2
RE: Fatal Error: Expected "("

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.

[Image: Tv0YgQb.gif]
Image by BandyGrass
09-27-2013, 04:15 AM
Find




Users browsing this thread: 1 Guest(s)