Fatal Error: Could not load script.
Main (1, 13) : ERR: Expected Data Type
Main (40, 1) : ERR: Unexpected token '}'
OK so I fixed the second error by removing the } at the last line. The (1, 13) one I'm not so sure about.
I'd assume it wants something added/changed to this line:
void UseKey("Hotel Room Key", "Hotel Room Door"){
Resolved the issue by browsing some more. Scrapped the old stuff and threw this at the end of the basic one.
////////////////////////////
// Actual functions
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Hotel Room Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Hotel Room Door", 0.0f, false);
RemoveItem("Hotel Room Key");
AddDebugMessage("The Door has successfully opened. Congratulations!", false);
}
And this at the onEnter part:
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Hotel Room Key", "Hotel Room Door", "KeyOnDoor", true);
}