RE: ERROR: Expected '('
There were a few misplaces/mishaped brackets, so I went ahead and fixed all of them, here ya go:
void OnStart()
{
AddUseItemCallback("", "basekey_1", "stairdoor", "KeyOnDoor", true);
SetEntityPlayerInteractCallback("basekey_1", "ActivateMonster", true);
SetPlayerLampOil(50.0f);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("stairdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "stairdoor", 0.0f, false);
RemoveItem("basekey_1");
}
void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
}
void DoorLockedPlayer(string &in entity)
{
if(GetSwingDoorLocked("stairdoor") == true)
{
SetMessage("Messages", "basedoorlock", 0);
}
}
void func_slam (string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("kitchendoor", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0.0f, false);
PlaySoundAtEntity("", "react_scare", "Player", 0.0f, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0.0f, false);
GiveSanityDamage(5.0f, true);
}
void OnEnter()
{
}
void OnLeave()
{
}
Hope that helped.
I rate it 3 memes.
|