Frictional Games Forum (read-only)

Full Version: My C.S. keeps crashing but...no error shown?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
Code:
////////////////////////////
// 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
For RawrDoors :: StartPlayerLookAt and ActivateMonster :: StartPlayerLookAt, you have an ` that isn't supposed to be there.
(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!