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
Fatal error help please
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#1
Fatal error help please

Hey guys when i load my map on Amnesia it gives me this error:

[Image: fatalerror.png]

Here is my maps .hps file:

void OnStart()
{
AddEntityCollideCallback("korv_foreal", "korven", "BreakDoor", true, 1);
AddUseItemCallback("UseCrowbar", "crowbar_1", "korv_use_crowbar", "UseCrowbar", true);
SetLocalVarInt("CrowbarUsed", 0);
AddEntityCollideCallback("Player", "ScriptArea_1", "RollCredits", true, 1);
AddEntityCollideCallback("Player", "MonsterArea", "Spawn_Monster", true);
}

void UseCrowbar(string &in asItem, string &in asEntity)
{
    SetEntityActive("crowbar_joint_1", true);
    RemoveItem(asItem);
    AddLocalVarInt("CrowbarUsed", 1);
}

void BreakDoor(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("korv_foreal", false);
    SetSwingDoorLocked("korven_door", false, true);
    SetPropHealth("korven_door", 0);
    SetSwingDoorClosed("korven_door", false, false);
    PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false);
    CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
    SetEntityActive("broken_korv", true);
    GiveSanityBoostSmall();
}

void RollCredits(string &in asParent, string &in asChild, int alState)
{
    StartCredits("", true, "Ending", "MainCredits", 0);
}

void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

void OnLeave()
{

}

And this is what i put inside of my .lang file for the SetMessage("Korv", "Korv2", 5.0f);:

<CATEGORY Name="Korv">
        <Entry Name="Korv2">Quickly! Run to the door!</Entry>
        </CATEGORY>
Please help Confused

Thanks,
TheDavenia

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
(This post was last modified: 06-28-2011, 10:17 PM by TheDavenia.)
06-28-2011, 10:05 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Fatal error help please

Try this:

void OnStart()
{
AddEntityCollideCallback("korv_foreal", "korven", "BreakDoor", true, 1);
AddUseItemCallback("UseCrowbar", "crowbar_1", "korv_use_crowbar", "UseCrowbar", true);
SetLocalVarInt("CrowbarUsed", 0);
AddEntityCollideCallback("Player", "ScriptArea_1", "RollCredits", true, 1);
AddEntityCollideCallback("Player", "MonsterArea", "Spawn_Monster", true, 1);
}

void UseCrowbar(string &in asItem, string &in asEntity)
{
    SetEntityActive("crowbar_joint_1", true);
    RemoveItem(asItem);
    AddLocalVarInt("CrowbarUsed", 1);
}

void BreakDoor(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("korv_foreal", false);
    SetSwingDoorLocked("korven_door", false, true);
    SetPropHealth("korven_door", 0);
    SetSwingDoorClosed("korven_door", false, false);
    PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false);
    CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
    SetEntityActive("broken_korv", true);
    GiveSanityBoostSmall();
}

void RollCredits(string &in asParent, string &in asChild, int alState)
{
    StartCredits("", true, "Ending", "MainCredits", 0);
}

void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

void OnEnter()
{

}

void OnLeave()
{

}

06-28-2011, 11:10 PM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#3
RE: Fatal error help please

(06-28-2011, 11:10 PM)Kyle Wrote: Try this:

void OnStart()
{
AddEntityCollideCallback("korv_foreal", "korven", "BreakDoor", true, 1);
AddUseItemCallback("UseCrowbar", "crowbar_1", "korv_use_crowbar", "UseCrowbar", true);
SetLocalVarInt("CrowbarUsed", 0);
AddEntityCollideCallback("Player", "ScriptArea_1", "RollCredits", true, 1);
AddEntityCollideCallback("Player", "MonsterArea", "Spawn_Monster", true, 1);
}

void UseCrowbar(string &in asItem, string &in asEntity)
{
    SetEntityActive("crowbar_joint_1", true);
    RemoveItem(asItem);
    AddLocalVarInt("CrowbarUsed", 1);
}

void BreakDoor(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("korv_foreal", false);
    SetSwingDoorLocked("korven_door", false, true);
    SetPropHealth("korven_door", 0);
    SetSwingDoorClosed("korven_door", false, false);
    PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false);
    CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
    SetEntityActive("broken_korv", true);
    GiveSanityBoostSmall();
}

void RollCredits(string &in asParent, string &in asChild, int alState)
{
    StartCredits("", true, "Ending", "MainCredits", 0);
}

void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

void OnEnter()
{

}

void OnLeave()
{

}

Error is gone but this whole thing just doesent work now:

void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

void TimerStopPlayerLookAtKorven(string &in asTimer)
{
StopPlayerLookAt();
}
Confused

Thanks for trying anyways Smile

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
06-28-2011, 11:19 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#4
RE: Fatal error help please

(06-28-2011, 11:19 PM)TheDavenia Wrote: Error is gone but this whole thing just doesent work now:

void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

void TimerStopPlayerLookAtKorven(string &in asTimer)
{
StopPlayerLookAt();
}
Confused

Thanks for trying anyways Smile

So I take it the part of code you posted now doesn't work? I spotted the problem. Try this:

void Spawn_Monster(string &in asEntity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

06-28-2011, 11:33 PM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#5
RE: Fatal error help please

(06-28-2011, 11:33 PM)Kyle Wrote:
(06-28-2011, 11:19 PM)TheDavenia Wrote: Error is gone but this whole thing just doesent work now:

void Spawn_Monster(string &in entity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

void TimerStopPlayerLookAtKorven(string &in asTimer)
{
StopPlayerLookAt();
}
Confused

Thanks for trying anyways Smile

So I take it the part of code you posted now doesn't work? I spotted the problem. Try this:

void Spawn_Monster(string &in asEntity)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

Weird... Still doesn't work... Confused

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
06-28-2011, 11:40 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#6
RE: Fatal error help please

Whoops. I didn't look at your full script until now in comparison with the other chunk you gave me. Try this:

void Spawn_Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

06-29-2011, 12:15 AM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#7
RE: Fatal error help please

(06-29-2011, 12:15 AM)Kyle Wrote: Whoops. I didn't look at your full script until now in comparison with the other chunk you gave me. Try this:

void Spawn_Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Korven", true);
ShowEnemyPlayerPosition("Korven");
SetMessage("Korv", "Korv2", 5.0f);
GiveSanityDamage(9.0f, true);
StartPlayerLookAt("Korven", 10, 50, "");
AddTimer("", 1.0f, "TimerStopPlayerLookAtKorven");
}

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

Nope still nothing Confused
everything works except for the text

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
(This post was last modified: 06-29-2011, 12:21 AM by TheDavenia.)
06-29-2011, 12:18 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#8
RE: Fatal error help please

Is any of you text working?


Do you have a description for your custom story? If yes, does it say "No Description" or something like that? If that is the case, then your "extra_english.lang" is messed up. :/

(This post was last modified: 06-29-2011, 12:29 AM by Kyle.)
06-29-2011, 12:29 AM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#9
RE: Fatal error help please

Nope everything is working it's just when you look at the monster its supposed to say Quick! Run to the door!
But it doesn't do that Confused

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
06-29-2011, 12:32 AM
Find
Fnoigy Offline
Junior Member

Posts: 16
Threads: 4
Joined: Apr 2011
Reputation: 0
#10
RE: Fatal error help please

This is why you have the game running and your map loaded BEFORE you start editing your script. Go to the wiki and follow the directions for setting up a dev environment. This will make your life so much easier!
06-29-2011, 12:22 PM
Find




Users browsing this thread: 1 Guest(s)