Hey guys, this is my first post!
I've been trying to learn the basics of scripting, and I find it rather difficult!

Anyhow; I tried to make a key work to a door, but I just can't seem to get it right... Here's the script I've written:
void Onstart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1");
}
Where did I get it wrong?