(10-23-2011, 02:51 PM)Lemorz56 Wrote: This is how the part looks, Still same error
void PianoScare(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
}
if(alState == -1)
{ <-----------1
StopSound("general_piano03.ogg", 5);
}
} <-----------2
Two things,
1: What is this doing here? your opening something when it's uneeded
2: I'm assuming that closing is for the number 1.
void PianoScare(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
if(alState == -1)
StopSound("general_piano03.ogg", 5);
}
Im not sure what your doing with the if statement.... explain that aswell if this doesn't work