Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Amnesia Custom Story main(7,19): ERR Unexpected identifier
summit Offline
Senior Member

Posts: 273
Threads: 20
Joined: Jun 2013
Reputation: 7
#2
RE: Amnesia Custom Story main(7,19): ERR Unexpected identifier

I edited the code. There were errors. Try this one:

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "kulcs_2", "ajto_2", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_3", "kinyitas_3", "UsedKeyOnDoor", true);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity);
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}
void UseKeyOnDoor(string &in asItem, string &in asEntity);
{
SetSwingDoorLocked("ajto_2", false, true);
PlaySoundAtEntity("", "unlock_door", "ajto_2", 0, false);
RemoveItem("kulcs_2");
}
void UseKeyOnDoor(string &in asItem, string &in asEntity);
{
SetSwingDoorLocked("kinyitas_3", false, true);
PlaySoundAtEntity("", "unlock_door", "kinyitas_3", 0, false);
RemoveItem("key_3");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

This should work.
(This post was last modified: 09-06-2013, 03:41 PM by summit.)
09-06-2013, 03:36 PM
Find


Messages In This Thread
RE: Amnesia Custom Story main(7,19): ERR Unexpected identifier - by summit - 09-06-2013, 03:36 PM



Users browsing this thread: 1 Guest(s)