The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Scripting Problem
DubbaNinja Offline
Junior Member

Posts: 4
Threads: 3
Joined: Apr 2012
Reputation: 0
#1
Scripting Problem

Hi, I am a noob to making maps on Amnesia and game development. Especially scripting. Evereytime I run this (Doorslam Scare) script, I get (FATAL ERROR: Could not load script file 'custom_stories/Retorta_Cerebrum/maps/Mansion01.hps'! main (26,1) : ERR : Unexpected token '{'

I have followed the Wiki for this script to the letter but everytime is the same! Here is my script:


////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


void OnStart()
{
AddUseItemCallback("", "studykey_1", "mansiondoor_1", "FUNCTION", true);
}
void FUNCTION(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem("studykey_1");
}


{
AddEntityCollideCallback("Player", "doorslam_1", "Collidedoorslam_1", true, 1);
}

void Collidedoorslam_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansiondoor_1", true, true);
}






_____


Please help,
Dubba
(This post was last modified: 04-24-2012, 05:57 AM by DubbaNinja.)
04-23-2012, 09:58 PM
Find


Messages In This Thread
Scripting Problem - by DubbaNinja - 04-23-2012, 09:58 PM
RE: Scripting Problem - by Cranky Old Man - 04-23-2012, 11:08 PM
RE: Scripting Problem - by JenniferOrange - 04-23-2012, 11:37 PM
RE: Scripting Problem - by DubbaNinja - 04-24-2012, 05:56 AM



Users browsing this thread: 2 Guest(s)