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 Error
Rouvis Offline
Junior Member

Posts: 7
Threads: 2
Joined: Nov 2010
Reputation: 0
#1
Question  Script Error

Everytime i start my Map i get this message "FATAL ERROR: Could not load script file 'custom_stories/myfirst/custom_stories/myfirst/maps/Basement.hps'!
main (15,1 : ERR : Expected ',' or ';'


This is my Script. http://www.mediafire.com/?dimnlm15ztb761t

Please tell me what i did wrong. =) I am a noob at Scripting Tongue
06-16-2011, 03:22 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Script Error

Spoiler below!

////////////////////////////
// Run first time starting map
void OnStart()
{
PlayMusic("12_amb.ogg", true, 100.0, 0.0, 1, true);
AddEntityCollideCallback("Player", "AreaBangDoor", "CollideBangDoor", true, 1); //Begin the door bang and pain event
}

////////////////////////////
// Run when entering map
void OnEnter()
{
}
//////////////////////////////
//BEGIN BANG AND PAIN SOUNDS//
void CollideBangDoor(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("bangs", "05_event_door_bang", "scare_door_1", 1, false);
PlaySoundAtEntity("whineaa", "scare_whine_loop", "Player", 0.5f, false);

FadeSepiaColorTo(0.75f, 0.3f);
FadeImageTrailTo(1.5, 0.5);

AddTimer("bang1", 0.6f, "TimerBangDoor");
AddTimer("bang2", 1.6f, "TimerBangDoor");
AddTimer("bang3", 2.5f, "TimerBangDoor");
AddTimer("bang4", 3.0f, "TimerBangDoor");
}
void TimerBangDoor(string &in asTimer)
{
if(asTimer == "bang1"){
AddPropImpulse("scare_door_1", 0, 0, 5, "World");
PlaySoundAtEntity("scare", "react_scare", "Player", 0.25f, false);
CreateParticleSystemAtEntity("bang1", "ps_dust_impact_vert.ps", "scare_door_1", false);
StartScreenShake(0.008, 0.5f, 0.1f,0.3f);
GiveSanityDamage(10, true);
}
else if(asTimer == "bang2") {
AddPropImpulse("scare_door_1", 0, 0, 5, "World");
CreateParticleSystemAtEntity("bang1", "ps_dust_impact_vert.ps", "scare_door_1", false);
StartScreenShake(0.008, 0.5f, 0.1f,0.3f);
}
else if(asTimer == "bang3") {
AddPropImpulse("scare_door_1", 0, 0, 5, "World");
PlaySoundAtEntity("scare", "react_breath", "Player", 0.5f, false);
CreateParticleSystemAtEntity("bang1", "ps_dust_impact_vert.ps", "scare_door_1", false);
StartScreenShake(0.008, 0.5f, 0.1f,0.3f);
}
else {
SetSwingDoorLocked("scare_door_1", false, false);
FadeSepiaColorTo(0, 0.3f);
FadeImageTrailTo(0, 0.1);
StopSound("whineaa", 4);
}
}
//END BANG AND PAIN SOUNDS//
////////////////////////////

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


You missed { } after void OnEnter(). By the way, just use [spoiler]a spoiler to post your code rather than uploading it.[/spoiler*]. Delete the * for it to work.
(This post was last modified: 06-16-2011, 03:34 PM by Roenlond.)
06-16-2011, 03:33 PM
Find
Rouvis Offline
Junior Member

Posts: 7
Threads: 2
Joined: Nov 2010
Reputation: 0
#3
RE: Script Error

Finally it works! Thank you very much! =))))
06-16-2011, 03:35 PM
Find




Users browsing this thread: 1 Guest(s)