////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("amb_safe.ogg", true, 0.5, 5, 0, true);
GivePlayerDamage(50, "", false, true);
AddUseItemCallback("", "crowbar", "closet", "KeyOnDoor1", true);
AddUseItemCallback("", "HallKey", "hall", "KeyOnDoor2", true);
AddUseItemCallback("", "artroomkey", "artroom", "KeyOnDoor3", true);
AddUseItemCallback("", "pathwaytolabkey", "pathtolab", "KeyOnDoor4", true);
SetLevelDoorLockedText("pathtolab", "Doors", "Door_pathtolab_Name");
SetLevelDoorLockedText("frontdoor", "Doors", "Door_frontdoor_Name");
AddEntityCollideCallback("Player", "readnote", "AddQuest", true, 1);
AddEntityCollideCallback("Player", "nighttime", "SetMessage", true, 1);
SetEntityCallbackFunc("fromfriend", "OnPickup");
SetEntityCallbackFunc("lantern", "OnPickup1");
SetMessage("MessageDisplay", "Message_wakingup_Name", 5.0f);
StartPlayerLookAt("fromfriend", 2.0f, 2.0f, "");
AddTimer("", 5.0f, "stoplook");
}
void SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
{
SetMessage("MessageDisplay", "Message_nighttime_Name", 5.0f);
}
The problem is the "void SetMessage (and so on till the } bracket)". Everytime i run the map with this command, it crashes and gives me an error, however, when i remove it, it runs perfectly normal...can anyone help me and see whats the problem? thanks.
BTW, i included a picture of the error it gives me.