Ok what's wrong here? you go into room 3(this script is for room 3) and castle_2 is locked. Then you go into another map and get the key for it so you can come back and unlock it, but Map 3 won't even load. I need help
void OnStart()
{
AddUseItemCallback("", "Key3", "castle_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, false);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("Key3");
}
{
AddUseItemCallback("", "Key4", "castle_2", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_2", false, false);
PlaySoundAtEntity("", "unlock_door", "castle_2", 0, false);
RemoveItem("Key4");
}
void OnEnter()
{
}
void OnLeave()
{
}