Please help! I have an error when i run my custom map. Its in the last line and character of this script, and i cant figure it out, please point me in the right direction. Thank you in advance!
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "door_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_cabinet_1", "cabinet_1", "KeyOnDoor2", true);
AddUseItemCallback("", "exitkey_1", "exitdoor_1", "KeyOnDoor3", true);
AddUseItemCallback("", "exitkey_2", "exitdoor_2, "KeyOnDoor4", true);
AddUseItemCallback("", "exitkey_3", "exitdoor_3", "KeyOnDoor5", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "MonsterFunction2", true, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_cabinet_1");
}
void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "exitdoor_1", 0, false);
RemoveItem("exitkey_1");
}
void KeyOnDoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor_2", false, true);
PlaySoundAtEntity("", "unlock_door", "exitdoor_2", 0, false);
RemoveItem("exitkey_2");
}
void KeyOnDoor5(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor_3", false, true);
PlaySoundAtEntity("", "unlock_door", "exitdoor_3", 0, false);
RemoveItem("exitkey_3");
}
void MonsterFunction1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_1", true);
SetSwingDoorLocked("trapdoor_1", true, true);
}
void MonsterFunction2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_2", true);
SetSwingDoorLocked("trapdoor_1", true, true);
}
////////////////////////////
//Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}