Loveridge
Junior Member
Posts: 21
Threads: 8
Joined: Nov 2011
Reputation:
0
|
RE: Unexpected error on my script.
(12-02-2011, 07:23 PM)Khyrpa 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(5.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");
}
void OnStart()
{
SetEntityConnectionStateChangeCallback("booklever", "func_shelf");
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("secret",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
are you sure you are using c++ language or the configs recommended in wiki for notepad++ or whatever youre using? It makes spotting those bracket errors a lot easier
|
|
12-02-2011, 08:35 PM |
|