triadtimes
Senior Member
Posts: 508
Threads: 16
Joined: Jan 2011
Reputation:
21
|
RE: I cant find the unexpected token! Help please :)
Spoiler below!
(12-06-2011, 09:20 PM)Loveridge Wrote: ////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door_1", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(50.0f, true);
}
void OnStart()
{
AddUseItemCallback("","crowbar_1", "cdoor", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("crowbar_1");
}
{
AddEntityCollideCallback("Player", "doorslam2", "func_slam", true, 1);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("slamdoor2", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(50.0f, true);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
My guess would be to check the bold-ed area, there is no function preceding it. You should probably move that to the OnStart or OnEnter area.
(This post was last modified: 12-06-2011, 09:58 PM by triadtimes.)
|
|