Frictional Games Forum (read-only)
Unexpected err { - 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: Unexpected err { (/thread-22147.html)

Pages: 1 2 3


RE: Unexpected err { - mrjoshy12 - 07-16-2013

(07-16-2013, 11:47 AM)The chaser Wrote:
Code:
////////////////////////////

// This runs when the player enters the map

void OnEnter()

{

     AddUseItemCallback("", "escape_door_key1", "escape_room_door1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "lol_key1", "lol_door1", "UsedKeyOnDoor2", true);

}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

     SetSwingDoorLocked("escape_room_door1", false, true);

     PlaySoundAtEntity("", "unlock_door.snt", "escape_room_door1", 0, false);

     RemoveItem("escape_door_key1");

}



void UsedKeyOnDoor2(string &in asItem, string &in asEntity)

{

     SetSwingDoorLocked("lol_door1", false, true);

     PlaySoundAtEntity("", "unlock_door.snt", "lol_door1", 0, false);

     RemoveItem("lol_key1");

     PlayMusic("Without_You_.ogg", false, 1, 0, true);

}

//===========================================

// This runs when the player leaves the map

void OnLeave()

{

}

Does it cost much to simply fix the script? Here you have, this should be ok, without errors.
THANK YOU, finally i get to play it