Just as what the title says, I'm getting that error whenever I load my cs, because I just implemented this script inside my hps file which is the voice intro one
Code:
void OnStart()
{
FadeOut(0);
AddEffectVoice("intro_1", "", "Voice", "intro1",
false, "", 0, 5);
AddEffectVoice("intro_2", "", "Voice", "intro2",
false, "", 0, 5);
AddEffectVoice("intro_3", "", "Voice", "intro3",
false, "", 0, 5);
AddEffectVoice("intro_4", "", "Voice", "intro4",
false, "", 0, 5);
SetEffectVoiceOverCallback("VoicesDone"); //This enables a callback that happens when the voices are done.
}
void wakeUp()
{
FadeIn(2);
SetPlayerActive(true);
SetSanityDrainDisabled(false);
ShowPlayerCrossHairIcons(true);
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(10); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
PlayGuiSound("react_pant3.ogg", 1);
FadeSepiaColorTo(0, 2);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.5, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
---------------------------
FATAL ERROR
---------------------------
FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (15, 1) : ERR : Unexpected token '{'
---------------------------
OK
---------------------------
Now I know how to deal with errors... sometimes but "unexpected token {" does that mean that I have another same token? or I'm missing one, that's the problem, and I really don't like people doing it for me, I would love to solve it myself but how? I don't know what unexpected token { means!!!
void wakeUp() { FadeIn(2); SetPlayerActive(true); SetSanityDrainDisabled(false); ShowPlayerCrossHairIcons(true); FadeOut(0); // Instantly fades the screen out. (Good for starting the game) FadeIn(10); // Amount of seconds the fade in takes FadeImageTrailTo(2, 2); PlayGuiSound("react_pant3.ogg", 1); FadeSepiaColorTo(0, 2); SetPlayerActive(false); FadePlayerRollTo(50, 220, 220); // "Tilts" the players head FadeRadialBlurTo(0.5, 2); SetPlayerCrouching(true); // Simulates being on the ground AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1); AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last }
Above is incorrect. They're all should be in OnStart.
void wakeUp() { FadeIn(2); SetPlayerActive(true); SetSanityDrainDisabled(false); ShowPlayerCrossHairIcons(true); FadeOut(0); // Instantly fades the screen out. (Good for starting the game) FadeIn(10); // Amount of seconds the fade in takes FadeImageTrailTo(2, 2); PlayGuiSound("react_pant3.ogg", 1); FadeSepiaColorTo(0, 2); SetPlayerActive(false); FadePlayerRollTo(50, 220, 220); // "Tilts" the players head FadeRadialBlurTo(0.5, 2); SetPlayerCrouching(true); // Simulates being on the ground AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1); AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last }
Thanks man it's working perfectly now, but one more thing! the voices are working but I don't want the voices to start when you wake up in the cell, I want the voices to start when it's a black screen and there's no noise then after the voices are done I want the player to start the waking script and in the cell! how do I do that pls?
Add a timer on start...
Then put your voices in that timer. UBER easy
Btw..
For every question you have you make a tread....
Can''t you make more things into 1 post?
There are over 30 posts from you in 1 months i guess...
Just, try to lern and read the wiki a bit more?