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
ERROR: Unexpected end of file
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
RE: ERROR: Unexpected end of file

PHP Code: (Select All)
////////////////////////////
// Run first time starting map
void OnStart()
{
  
AddUseItemCallback("", "Key_1", "Door_1", "UsedKeyOnDoor", true);
  
AddUseItemCallback("", "Key_2", "Door_2", "UsedKeyOnDoor_2", true);
  
AddUseItemCallback("", "Secretkey2", "metal_1", "UsedKeyOnDoor_3", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
  
SetSwingDoorLocked("Door_1", false, true);
  
PlaySoundEntity("", "unlock_door", "Door_1", 0, false);
  
RemoveItem("Key_1");
}

void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
  
SetSwingDoorLocked("Door_2", false, true);
  
PlaySoundAtEntity("", "unlock_door", "Door_2", 0,false);
  
RemoveItem("Key_2");
} 
// <- THERE WAS A } MISSING.

void Message_1(string &in asEntity)
{
  
SetMessage("Message", "Message_1", 2);
}

void UsedKeyOnDoor_3(string &in asItem, string &in asEntity)
{
  
SetSwingDoorLocked("metal_1", false, true);
  
PlaySoundEntity("", "unlock_door", "metal_1", 0, false);
  
RemoveItem("Secretkey2");
} 

/////////////////////////////
// Run when entering map
void OnEnter()
{


}

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


} 

There was a } missing, I added a comment in the code at the location.
(This post was last modified: 10-19-2011, 03:12 PM by jens.)
10-19-2011, 03:10 PM
Website Find


Messages In This Thread
ERROR: Unexpected end of file - by Wickedwrath - 10-19-2011, 03:08 PM
RE: ERROR: Unexpected end of file - by jens - 10-19-2011, 03:10 PM
RE: ERROR: Unexpected end of file - by jens - 10-19-2011, 03:32 PM
RE: ERROR: Unexpected end of file - by jens - 10-19-2011, 03:36 PM
RE: ERROR: Unexpected end of file - by death5657 - 03-17-2013, 02:38 PM



Users browsing this thread: 1 Guest(s)