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
Script Help Unexpected error on my script.
Loveridge Offline
Junior Member

Posts: 21
Threads: 8
Joined: Nov 2011
Reputation: 0
#3
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
Find


Messages In This Thread
Unexpected error on my script. - by Loveridge - 12-02-2011, 06:18 PM
RE: Unexpected error on my script. - by Khyrpa - 12-02-2011, 07:23 PM
RE: Unexpected error on my script. - by Loveridge - 12-02-2011, 08:35 PM



Users browsing this thread: 1 Guest(s)