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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: My C.S. keeps crashing but...no error shown?

For RawrDoors :: StartPlayerLookAt and ActivateMonster :: StartPlayerLookAt, you have an ` that isn't supposed to be there.

Tutorials: From Noob to Pro
10-08-2013, 02:20 AM
Website Find
Inexedra Offline
Junior Member

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

(10-08-2013, 02:20 AM)Your Computer Wrote: For RawrDoors :: StartPlayerLookAt and ActivateMonster :: StartPlayerLookAt, you have an ` that isn't supposed to be there.

Well, that fixes what would've been a colossal problem (thank you so much too Tongue), but the same thing keeps happening, sadly enough. But nice job spotting that, I would've never seen it.

EDIT: I FOUND THE PROBLEM!!! I simply forgot a parenthesis and a few typos, including the apostrophe 0s. Thank you so much, Computer!
(This post was last modified: 10-08-2013, 07:30 PM by Inexedra.)
10-08-2013, 02:42 AM
Find




Users browsing this thread: 1 Guest(s)