Frictional Games Forum (read-only)
Custom Music FATAL ERROR (Seriously Need Assistance) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Custom Music FATAL ERROR (Seriously Need Assistance) (/thread-19249.html)



Custom Music FATAL ERROR (Seriously Need Assistance) - Fictionult - 11-16-2012

Hey there guys, I'll provide you with a couple of screenshots, and help is highly appreciated.


I have all the code written down into my .hps file.. I followed and learned what I was suppose to script and this is currently what I have (on the .hps)

[Image: uLyqf.jpg]
To continue on, when I launch my game, select the story.. It closes the game right after showing me this message presented here..

[Image: XhV1S.jpg]



Please, if someone has a solution on how I can fix this, please help out.
Again, I'd much appreciate any help!


RE: Custom Music FATAL ERROR (Seriously Need Assistance) - Adny - 11-16-2012

remove the ";" at the end of void start(string &in asParent, string &in asChild, int alState)


For future reference, please just copy&paste the script directly into the chat box - it makes it easier for others to revise.


RE: Custom Music FATAL ERROR (Seriously Need Assistance) - Fictionult - 11-16-2012

(11-16-2012, 06:13 PM)andyrockin123 Wrote: remove the ";" at the end of void start(string &in asParent, string &in asChild, int alState)

For future reference, please just copy&paste the script directly into the chat box - it makes it easier for others to revise.
That didn't entirely help, just gave a new error. Instead it now says main (5, 1) now as opposed to (13, 1)..
Oh and.

For anyone who needs this.



//////////////////
// Run first time starting map
void OnStart()
{
Fadeout(0);

FadeIn(50);

AddEntityCollideCallback ("PlayerStartArea_1" , "Music_1", "start", true, 1);
}

void start(string &in asParent, string &in asChild, int alstate)
{
PlaySoundAtEntity("", "Distance.snt", "PlayerStartArea_1", 0, false);
}
//////////////////
// Run first time starting map
void OnEnter()
{

}

//////////////////
// Run first time starting map
void OnLeave()
{

}


RE: Custom Music FATAL ERROR (Seriously Need Assistance) - Adny - 11-16-2012

the "O" in FadeOut needs to be capitalized.


RE: Custom Music FATAL ERROR (Seriously Need Assistance) - Fictionult - 11-16-2012

(11-16-2012, 06:21 PM)andyrockin123 Wrote: the "O" in FadeOut needs to be capitalized.
The map now runs, thanks to you.

Yet no music is playing at all. Any wonder to that?


RE: Custom Music FATAL ERROR (Seriously Need Assistance) - The chaser - 11-16-2012

(11-16-2012, 06:26 PM)Fictionult Wrote:
(11-16-2012, 06:21 PM)andyrockin123 Wrote: the "O" in FadeOut needs to be capitalized.
The map now runs, thanks to you.

Yet no music is playing at all. Any wonder to that?
This is what you have:

Code:
//////////////////

// Run first time starting map

void OnStart()

{

Fadeout(0);



FadeIn(50);



AddEntityCollideCallback ("PlayerStartArea_1" , "Music_1", "start", true, 1);

}



void start(string &in asParent, string &in asChild, int alstate)

{

PlaySoundAtEntity("", "Distance.snt", "PlayerStartArea_1", 0, false);

}

//////////////////

// Run first time starting map

void OnEnter()

{



}



//////////////////

// Run first time starting map

void OnLeave()

{



}

It should be like this:

Code:
//////////////////

// Run first time starting map

void OnStart()

{

FadeOut(0);



FadeIn(50);



AddEntityCollideCallback ("Player" , "nameofarea", "start", true, 1);

}



void start(string &in asParent, string &in asChild, int alstate)

{

PlaySoundAtEntity("", "Distance.snt", "PlayerStartArea_1", 0, false);

}

//////////////////

// Run first time starting map

void OnEnter()

{



}



//////////////////

// Run first time starting map

void OnLeave()

{



}

You have to specify that when the player collides with an area this one does something, right? Wink


RE: Custom Music FATAL ERROR (Seriously Need Assistance) - Fictionult - 11-16-2012

(11-16-2012, 06:40 PM)The chaser Wrote:
(11-16-2012, 06:26 PM)Fictionult Wrote:
(11-16-2012, 06:21 PM)andyrockin123 Wrote: the "O" in FadeOut needs to be capitalized.
The map now runs, thanks to you.

Yet no music is playing at all. Any wonder to that?
This is what you have:

Code:
//////////////////

// Run first time starting map

void OnStart()

{

Fadeout(0);



FadeIn(50);



AddEntityCollideCallback ("PlayerStartArea_1" , "Music_1", "start", true, 1);

}



void start(string &in asParent, string &in asChild, int alstate)

{

PlaySoundAtEntity("", "Distance.snt", "PlayerStartArea_1", 0, false);

}

//////////////////

// Run first time starting map

void OnEnter()

{



}



//////////////////

// Run first time starting map

void OnLeave()

{



}

It should be like this:

Code:
//////////////////

// Run first time starting map

void OnStart()

{

FadeOut(0);



FadeIn(50);



AddEntityCollideCallback ("Player" , "nameofarea", "start", true, 1);

}



void start(string &in asParent, string &in asChild, int alstate)

{

PlaySoundAtEntity("", "Distance.snt", "PlayerStartArea_1", 0, false);

}

//////////////////

// Run first time starting map

void OnEnter()

{



}



//////////////////

// Run first time starting map

void OnLeave()

{



}

You have to specify that when the player collides with an area this one does something, right? Wink
Yours was correct, although I had to fix a couple things.
Still, thank you so much for your help. I appreciate all of it.