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
Magic Scripting Error ! HELP
Paulpolska Offline
Member

Posts: 144
Threads: 29
Joined: Jun 2011
Reputation: 0
#1
Magic Scripting Error ! HELP

I have space error in my script
While map is loading game show me problem

"Unexpected end of file"
Line (133,2) (I pointed on down)

HELP !!!

void OnStart()
{
PlayMusic("18_amb.ogg", true, 0.7, 0.1, 10, false);
AddEntityCollideCallback("Player", "ScriptArea_1", "Scare", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Scare2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "Scare3", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "DoorClose", true, 1);
AddUseItemCallback("", "key_tomb_1", "cellar_wood01_6", "KeyOnDoor", true);
}



void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cellar_wood01_6", false, true);
RemoveItem("key_tomb_1");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0.0f, true);
AddTimer("", 0.1f, "ScareRoom");
}

void ScareRoom(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_2");
AddTimer("". 1.5f, "ScareRoom2");
}

void ScareRoom2(string &in asTimer)
{
PlayMusic("29_amb_end_intense.ogg", true, 0.7, 0.1, 10, false);
AddTimer("", 2.0f, "SoundSlime");
AddTimer("", 6.0f, "SoundSlime2");
AddTimer("", 10.0f, "SoundSlime3");
AddTimer("", 14.0f, "SoundSlime4");
}

void SoundSlime(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_monster_roar", "Player", 4.0f, true);
SetEntityActive("slime_anim_wall_1", true);
SetEntityActive("slime_anim_wall_2", true);
SetEntityActive("slime_egg_1", true);
SetEntityActive("slime_pile_1", true);
GiveSanityDamage(8, true);
}

void SoundSlime2(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_monster_roar", "Player", 4.0f, true);
SetEntityActive("slime_anim_ceiling_1", true);
SetEntityActive("slime_pile_2", true);
GiveSanityDamage(8, true);
}

void SoundSlime3(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_monster_roar", "Player", 4.0f, true);
SetEntityActive("slime_pile_large_1", true);
SetEntityActive("slime_egg_2", true);
GiveSanityDamage(8, true);
}

void SoundSlime4(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_monster_roar", "Player", 4.0f, true);
SetEntityActive("slime_anim_wall_3", true);
SetEntityActive("slime_pile_3", true);
SetEntityActive("slime_6way_1", true);
GiveSanityDamage(8, true);
AddTimer("", 4.0f, "Free");
}

void Free(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_3);
PlayMusic("18_amb.ogg", true, 0.7, 0.1, 10, false);
SetSwingDoorLocked("cellar_wood01_4", false, true);
}

void Scare(string &in asParent, string &in asChild, int alState)
{
PlayMusic("insanity_monster_roar01.ogg", false, 0.7, 0.1, 10, false);
GiveSanityDamage(20, true);
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
AddTimer("", 5.0f, "Next");
}

void DoorClose(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("cellar_wood01_2", true, true);
SetSwingDoorDisableAutoClose("cellar_wood01_2", true);
AddPropImpulse("cellar_wood01_2", 0.0f, 0.0f, -1.00f, "");
}


void Scare2(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(10, true);
AddTimer("", 0.1f, "Strach");
AddTimer("", 4.2f, "Strach");
}

void Scare3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("scare2", true);
}



void Strach(string &in asTimer)
{
PlaySoundAtEntity("", "05_event_door_bang.snt", "Player", 4.0f, true);
}


void Next(string &in asTimer)
{
ChangePlayerStateToNormal();
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
FadeImageTrailTo(0,1);
PlayMusic("18_amb.ogg", true, 0.7, 0.1, 10, false);
}

void OnEnter()
{
PlayMusic("18_amb.ogg", true, 0.7, 0.1, 10, false);
}  // THIS IS LINE 133


MY CUSTOM STORY - - STILL ALIVE - -
http://www.moddb.com/mods/still-alive
(This post was last modified: 06-26-2011, 11:12 AM by Paulpolska.)
06-26-2011, 11:12 AM
Find Reply
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#2
RE: Magic Scripting Error ! HELP

hmm the line doesnt seem to be wrong, but it's onEnter, What I did was putting a script on the start so the player starts in it and then it'll play the music. Or use the leveleditor, click on the sound tool and put the music out, you cant have multiple ambience sounds in a map that way, you have to use scripts in that case.

(This post was last modified: 06-26-2011, 11:41 AM by Rownbear.)
06-26-2011, 11:37 AM
Find Reply
Paulpolska Offline
Member

Posts: 144
Threads: 29
Joined: Jun 2011
Reputation: 0
#3
RE: Magic Scripting Error ! HELP

So even I delete Playmusic from "onstart" or "onenter" script all the time doesn't work. I tested this map more times but first time i have this problem after the script was update

MY CUSTOM STORY - - STILL ALIVE - -
http://www.moddb.com/mods/still-alive
(This post was last modified: 06-26-2011, 11:44 AM by Paulpolska.)
06-26-2011, 11:44 AM
Find Reply
Paulpolska Offline
Member

Posts: 144
Threads: 29
Joined: Jun 2011
Reputation: 0
#4
RE: Magic Scripting Error ! HELP

This problem is that I missed or I entered the wrong CHARACTERs becouse I find two already. HELP ;p


EDIT: IT works !! yeah

MY CUSTOM STORY - - STILL ALIVE - -
http://www.moddb.com/mods/still-alive
(This post was last modified: 06-26-2011, 01:15 PM by Paulpolska.)
06-26-2011, 01:12 PM
Find Reply




Users browsing this thread: 1 Guest(s)