(10-23-2011, 02:34 PM)flamez3 Wrote: It's really hard to read but ill give it a shot...
nupp cant read it, can you give it in a easier format? Like spaced and all that.
Also, give us the line and character line on where the unexpected end of file is
Ill try to make it spaced, But The forum messes it up, The error says this. Somwhere about the end its about.
"main (47, 2) ; Unexpected end of file"
HERE IS A BETTER VERSION
-----------------------------------------------------------------------------------------
void OnStart()
{
AddUseItemCallback("", "monsterdoorkey", "monsterdoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "PianoScare", false, 0);
AddEntityCollideCallback("Player", "ScriptArea_2", "PianoStop", false, 0);
}
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);
}
}
void pianotimer(string &in asTimer)
{
PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
AddTimer("pianotimer", 18, "pianotimer");
}
void PianoStop(string &in asParent, string &in asChild, int alState)
{
StopSound("PianoScareMusic", 0);
RemoveTimer("pianotimer");
SetLeverStuckState("piano_01, 0, true);
AddPropImpulse("piano_01", 0, 0, 100, "World");
PlaySoundAtEntity("PianoScareBoom", "break_wood", "piano_1", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "monsterdoor", 0.0f, false);
RemoveItem("monsterdoorkey");
}