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
lalakakaka Offline
Junior Member

Posts: 2
Threads: 1
Joined: Aug 2013
Reputation: 0
#3
RE: Amnesia Custom Story main(7,19): ERR Unexpected identifier

(09-06-2013, 03:36 PM)Arbies Wrote: 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.

Just i get this message: main(10,1) :ERR : Unexpected token'{'
main(16,1) :ERR : Unexpected token '{'
main(22,1) :ERR : Unexpected token '{'
09-06-2013, 06:17 PM
Find


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



Users browsing this thread: 2 Guest(s)