////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "girlsdormkey_1", "girlsdorm", "UsedKeyOnDoor_5", true);
if (GetGlobalInt("music") == 0)
{
PlayMusic("02_amb_safe.ogg", true, 100.0, 0.0, 1, true);
}
else if (GetGlobalInt("music") == 1)
{
PlayMusic("09_amb_safe.ogg", true, 100.0, 0.0, 1, true);
}
}
void UsedKeyOnDoor_5(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("girlsdormdoor", false);
PlaySoundAtEntity("", "unlock_door", "girlsdormdoor", 0, false);
RemoveUseItemCallback("girlsdormkey_1");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
StopMusic(1.0f, 1);
SetGlobalVarInt("music", 1);
}
I get an Error:
(108, 5): No Matching signatures
(112, 10) No matching signatures
I put everything in the correct place