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
amnesiaplayer321 Offline
Junior Member

Posts: 31
Threads: 4
Joined: May 2013
Reputation: 0
#1
Scripting Problem

Hi.I am looking forward to create a new custom story for amnesia.But i have problems with my script.And i see nothing wrong.And when i launch my story,it gives that error:
FATAL ERROR: Could not load script file
'custom_stories/mystory/maps/lvl1.hps'!
main (17, 21): ERR :Unexpected end of file
My script file:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Key", "Mansion_door", "UsedKeyonDoor", true);
AddUseItemCallback("", "Key2", "Door2", "UsedKeyOnDoor", true);

void UsedKeyonDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("Mansion_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Mansion", 0, false);
SetSwingDoorLocked("Door2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door2", 0, false);

RemoveItem("Key");
RemoveItem("Key2");

Whats wrong about it and how to i fix?
(This post was last modified: 05-21-2013, 01:08 PM by amnesiaplayer321.)
05-20-2013, 07:19 PM
Find


Messages In This Thread
Scripting Problem - by amnesiaplayer321 - 05-20-2013, 07:19 PM
RE: Scripting Problem - by Bridge - 05-20-2013, 07:31 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 07:40 PM
RE: Scripting Problem - by Bridge - 05-20-2013, 07:42 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 07:44 PM
RE: Scripting Problem - by Tomato Cat - 05-20-2013, 07:59 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 08:06 PM
RE: Scripting Problem - by OriginalUsername - 05-20-2013, 08:27 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-20-2013, 08:45 PM
RE: Scripting Problem - by Bridge - 05-20-2013, 10:01 PM
RE: Scripting Problem - by PutraenusAlivius - 05-21-2013, 02:24 AM
RE: Scripting Problem - by Bonehead - 05-21-2013, 02:27 AM
RE: Scripting Problem - by amnesiaplayer321 - 05-21-2013, 04:07 AM
RE: Scripting Problem - by Tomato Cat - 05-21-2013, 05:55 AM
RE: Scripting Problem - by Your Computer - 05-21-2013, 11:48 AM
RE: Scripting Problem - by Tomato Cat - 05-21-2013, 03:17 PM
RE: Scripting Problem - by amnesiaplayer321 - 05-21-2013, 01:04 PM



Users browsing this thread: 1 Guest(s)