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
My C.S. keeps crashing but...no error shown?
Inexedra Offline
Junior Member

Posts: 2
Threads: 1
Joined: Oct 2013
Reputation: 0
#1
My C.S. keeps crashing but...no error shown?

Hey, all. I've been working on a custom story for Amnesia, and it is coming along rather decently.

But, I've been having a rage-inducing problem. It was working before, but now, I just...can't get into one of the maps. This started happening when I tried to make it so that when you picked up a key, a Brute would appear outside of you room. As soon as I tested it out, this started happening. When I try to enter, it crashes and rarely gives me an error. When it does, it says something like:
ExecuteString(1,2):ERR : Expected expression value
ExecuteString(1,2):ERR : Expected expression value
ExecuteString(1,2):ERR : Expected expression value
quite a few times and then shows me some weird symbols.

I have a slight feeling that this may be because of my new mind to Amnesia scripting, and if it is, I would appreciate an explanation of what my problem was.

The map's HPS file:
////////////////////////////
// Run when entering map
void OnStart()
{
        AddEntityCollideCallback("Player", "SpawnMonster", "startpatrol", true, 1);
        AddEntityCollideCallback("Player", "DespawnBrute1", "Safety", true, 1);
        AddEntityCollideCallback("Player", "DoorBang", "RawrDoors", true, 0);
        SetEntityPlayerInteractCallback("key_tomb_1", "ActivateMonster", true);
}
void startpatrol(string &in asParent, string &in asChild, int alState)
{
        SetPlayerSanity(0);
        PlaySoundAtEntity("", "react_scare", "Player", 0, false);
        PlaySoundAtEntity("", "door_mansion_close", "Player", 0, false);
        SetEntityActive("surprise_brute2", true);
        SetEntityActive("Sound_1", true);
        SetPlayerActive(false);
        StartPlayerLookAt("wall_default_14", 10, 50, "");
        AddTimer("", 1, "TimerStopPlayerLook");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_1", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_2", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_3", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_4", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_5", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_6", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_7", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_8", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("surprise_brute2", "PathNodeArea_10", 0, "");
}
void TimerStopPlayerLook (string &in asTimer)
{
        StopPlayerLookAt();
        SetPlayerActive(true);
}
void RawrDoors(string &in asParent, string &in asChild, int alState)
{
        StartPlayerLookAt("mansion_5", 0, 50, "");
        PlaySoundAtEntity("", "05_event_door_bang", "mansion_5", 0.0f, false);
        AddTimer("", 0.6f, "Bang");
        AddTimer("", 1.6f, "Bang");
        AddTimer("", 2.5f, "Bang");
        AddTimer("", 2.8f, "BangUnlock");
}
void Bang(string &in asTimer)
{    
        AddPropImpulse("mansion_5", 0, 0, 5, "World");
}
void BangUnlock(string &in asTimer)
{
        SetSwingDoorLocked("mansion_5", false, false);
        StopPlayerLookAt();
}
void Safety(string &in asParent, string &in asChild, int alState)
{
        SetEntityActive("surprise_brute2", false);
        GiveSanityBoost();
}
void ActivateMonster(string &in item)
{
        SetEntityActive("AnotherBrute", true);
        StartPlayerLookAt("AnotherBrute", 0, 50, "");
        AddTimer("", 1, "StopIt");
}

void StopIt(string &in asTimer
{
        StopPlayerLookAt();
}


void OnEnter()
{
        PlayMusic("16_amb", true, 0.7f, 1, 0, true);
}


void OnLeave()
{
        StopMusic(0.0f, 1);
}

Thank you. Big Grin

EDIT: Fixed the ' 0s
(This post was last modified: 10-08-2013, 07:30 PM by Inexedra.)
10-08-2013, 02:04 AM
Find


Messages In This Thread
My C.S. keeps crashing but...no error shown? - by Inexedra - 10-08-2013, 02:04 AM



Users browsing this thread: 1 Guest(s)