taz251
Junior Member
Posts: 7
Threads: 3
Joined: Jul 2012
Reputation:
0
|
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 |
|