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
Script Help Error unexpected token {
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Error unexpected token {

PHP Code: (Select All)
void OnStart()
{
    
FadeOut(0);
    
AddEffectVoice("intro_1""""Voice""intro1",
false""05);
AddEffectVoice("intro_2""""Voice""intro2",
false""05);
AddEffectVoice("intro_3""""Voice""intro3",
false""05);
AddEffectVoice("intro_4""""Voice""intro4",
false""05); 
    
SetEffectVoiceOverCallback("VoicesDone"); //This enables a callback that happens when the voices are done.
}

{
AddEntityCollideCallback("Player","CollideOpeningDustDoor","AreaTriggerDoor_1",true,1);
AddEntityCollideCallback("JumpscareDoor""AreaJumpscare""SanityDec"true1);
AddEntityCollideCallback("Handle""AreaConnect""AttachLever"true1);
AddEntityCollideCallback("Player""teleport""changemap"true 1);
AddEntityCollideCallback("Player""AreaDoor""EventDoor"true1);
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
GiveItemFromFile("tinderbox_"+1"tinderbox.ent");
GiveItemFromFile("tinderbox_"+1"tinderbox.ent");
GiveItemFromFile("tinderbox_"+1"tinderbox.ent");
AddTimer("voicesintro_1"6"VoicesIntro_1");

wakeUp();
}



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(22);
PlayGuiSound("react_pant3.ogg"1);
FadeSepiaColorTo(02);
SetPlayerActive(false); 
FadePlayerRollTo(50220220); // "Tilts" the players head
FadeRadialBlurTo(0.52);
SetPlayerCrouching(true); // Simulates being on the ground
AddEntityCollideCallback("Player""AreaCollide""EventCollide"true1);
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.

Spoiler below!

CORRECT
PHP Code: (Select All)
void OnStart()
{
    
FadeOut(0);
    
AddEffectVoice("intro_1""""Voice""intro1",
false""05);
AddEffectVoice("intro_2""""Voice""intro2",
false""05);
AddEffectVoice("intro_3""""Voice""intro3",
false""05);
AddEffectVoice("intro_4""""Voice""intro4",
false""05); 
    
SetEffectVoiceOverCallback("VoicesDone"); //This enables a callback that happens when the voices are done.
AddEntityCollideCallback("Player","CollideOpeningDustDoor","AreaTriggerDoor_1",true,1);
AddEntityCollideCallback("JumpscareDoor""AreaJumpscare""SanityDec"true1);
AddEntityCollideCallback("Handle""AreaConnect""AttachLever"true1);
AddEntityCollideCallback("Player""teleport""changemap"true 1);
AddEntityCollideCallback("Player""AreaDoor""EventDoor"true1);
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
GiveItemFromFile("tinderbox_"+1"tinderbox.ent");
GiveItemFromFile("tinderbox_"+1"tinderbox.ent");
GiveItemFromFile("tinderbox_"+1"tinderbox.ent");
AddTimer("voicesintro_1"6"VoicesIntro_1");
wakeUp();
}

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(22);
PlayGuiSound("react_pant3.ogg"1);
FadeSepiaColorTo(02);
SetPlayerActive(false); 
FadePlayerRollTo(50220220); // "Tilts" the players head
FadeRadialBlurTo(0.52);
SetPlayerCrouching(true); // Simulates being on the ground
AddEntityCollideCallback("Player""AreaCollide""EventCollide"true1);
AddTimer("trig1"11.0f"beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last



"Veni, vidi, vici."
"I came, I saw, I conquered."
03-09-2014, 10:46 AM
Find


Messages In This Thread
Error unexpected token { - by Radical Batz - 03-09-2014, 10:22 AM
RE: Error unexpected token { - by PutraenusAlivius - 03-09-2014, 10:46 AM
RE: Error unexpected token { - by DnALANGE - 03-09-2014, 03:12 PM



Users browsing this thread: 1 Guest(s)