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
UNEXPECTED END OF FILE ERROR?
taz251 Offline
Junior Member

Posts: 7
Threads: 3
Joined: Jul 2012
Reputation: 0
#3
RE: UNEXPECTED END OF FILE ERROR?

(07-27-2012, 09:59 AM)andyrockin123 Wrote: Fixed up some of the misplaced brackets and syntax; also placed the callbacks on start and added an "OnLeave" function.:


void OnStart()
{
SetEntityCallbackFunc("needle_1", "jump");
AddUseItemCallback("", "hallwaykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddUseItemCallback("", "needle_1", "mansion_4", "Needle", true);
}

void jump(string &in asEntity, string &in asType)
{
SetEntityActive("pig", true);
PlayGuiSound("21/21_scream10.ogg", 1.0f);
StartScreenShake(0.25f, 0.25, 0, 0.25);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0, false);
RemoveItem("hallwaykey_1");
}

void Needle(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveItem("needle_1");
}

void OnEnter()
{

}

void OnLeave()
{

}

Hope that helped!
Can't thank you enough for re-writing it, yet I get a new error.
"No matching signatures to SetSwingDoorLocked (string@&, const bool)" at line (24,1)
07-27-2012, 10:06 AM
Find


Messages In This Thread
UNEXPECTED END OF FILE ERROR? - by taz251 - 07-27-2012, 09:33 AM
RE: UNEXPECTED END OF FILE ERROR? - by Adny - 07-27-2012, 09:59 AM
RE: UNEXPECTED END OF FILE ERROR? - by taz251 - 07-27-2012, 10:06 AM
RE: UNEXPECTED END OF FILE ERROR? - by Adny - 07-27-2012, 10:15 AM
RE: UNEXPECTED END OF FILE ERROR? - by taz251 - 07-27-2012, 10:22 AM



Users browsing this thread: 1 Guest(s)