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
Amnesia crashes due to unexpected end in my .HPS file
EddieShoe Offline
Junior Member

Posts: 28
Threads: 6
Joined: Sep 2010
Reputation: 0
#1
Amnesia crashes due to unexpected end in my .HPS file

So I've been using this script for a while, but after I added the latest section it says: main (58, 2) : ERR Unexpected end of file. Any suggestions? It's been working so far :/ It crashes on game startup and it started after I added the "CastleSecret" func and the void for it, the bottom part of the script.

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "FlyingBodyArea", "FlyingBody", true, 1);
AddEntityCollideCallback("Player", "PotExplodeArea", "Explode", true, 1);
SetEntityConnectionStateChangeCallback("CastleLever", "CastleDoorOpen");
SetEntityConnectionStateChangeCallback("SecretLever", "CastleSecret");
}

void FlyingBody(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("pant1", "24_iron_maiden.snt", "Player", 2, true);
    SetPropHealth("CorpseWindow", 0);
    SetEntityActive("FlyingCorpse", true);
    AddPropImpulse("FlyingCorpse", -30, 0, 0, "world");
}

void Explode(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("pant2", "scare_wind.snt", "Player", 2, true);
    SetPropHealth("ExplodePot", 0);
}

void CastleDoorOpen(string &in asEntity, int alState)
{
    if (alState == 1)
{
    SetSwingDoorLocked("mansion_3", false, true);
    SetSwingDoorLocked("CastleDoor", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
return;
}

void CastleSecret(string &in asEntity, int alState)
{
    if (alState == 1)
{
    SetMoveObjectState("CastleSecretShelf",1.0f);
    PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);  
return;

}


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

}

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

}

Currently working on: "Awake"
Progress: ~5%
(This post was last modified: 06-28-2012, 11:53 PM by EddieShoe.)
06-28-2012, 11:12 PM
Find


Messages In This Thread
Amnesia crashes due to unexpected end in my .HPS file - by EddieShoe - 06-28-2012, 11:12 PM



Users browsing this thread: 1 Guest(s)