Frictional Games Forum (read-only)
[LVL ED] Fatal error sound entity - 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: [LVL ED] Fatal error sound entity (/thread-13852.html)



Fatal error sound entity - FlawlessHappiness - 03-08-2012

When i start my map i get the error:
FATAL ERROR: Could not load script file
'custom_stories/newmap/custom_stories/newmap/maps/newmap.hps'
!
main (15,2) : ERR : No matching signatures to
'PlaySoundAtEntity(string@&, string@&, string@&, string@&, const bool)'

Script:

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

}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key1", "door1", "UsedKeyOnDoor", true);
}

void MyFunc(string &in asName, int alCount)
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", "0", false);
RemoveItem("key1");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}

Whats wrong here? This is my first map so im a bit newbie.

I fixed some other issues. This is the only one i cant figure out...

EDIT: Okay DANG IT! I found it myself again... took some time but, i guess i should not post threads about scripts before im completely lost...
What i had to do was make the 0 with no quotes.
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);