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 Error, need help.
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#1
Amnesia Error, need help.

Hey guys, so i've been working alot on my custom story, and now i'm really tired, it kinda makes me retarded. So please tell me why Amnesia crashes, I'm sure it's some lame stupid problem, i'm just feeling really retarded right now. Please help.


These are the Callbacks for my padlock, that i'm supposed to break with a "stone_hammer_chipper".



AddUseItemCallback("", "stone_hammer_chipper", "padlock_rusty_1", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "stone_hammer_chipper", "prison_section_1", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "chipper_1", "prison_section_1", "UsedKeyOnDoor2", false);
AddUseItemCallback("", "chipper_1", "padlock_rusty_1", "UsedKeyOnDoor2", false);
AddUseItemCallback("", "hammer_2", "prison_section_1", "UsedKeyOnDoor2", false);
AddUseItemCallback("", "hammer_2", "padlock_rusty_1", "UsedKeyOnDoor2", false);
SetEntityPlayerInteractCallback("prison_section_1", "PadLockHint", true);
SetEntityPlayerInteractCallback("padlock_rusty_1", "PadLockHint", true);

This is the Callback syntax.


void UsedKeyOnDoor2(string &in item, string &in entity)
{
if(asItem == "hammer_2")
SetMessage("Padlock", "UseHammerOnPadlock", 0);
if(asItem == "chipper_1")
SetMessage("Padlock", "UseChipperOnPadlock", 0);

if(asItem == "stone_hammer_chipper")
SetPropHealth("padlock_rusty_1", 0.0f);
SetEntityActive("padlock_broken_1", true);
SetEntityActive("padlock_rusty_1", false);
RemoveItem("stone_hammer_chipper");
PlaySoundAtEntity("", "impact_metal_high.snt", "prison_section_1", 0, false);
GiveSanityBoost();
CompleteQuest("padlockquest", "PadLockQuest");
SetEntityPlayerInteractCallback("prison_section_1", "", false);
PlayMusic("12_puzzle_cavein.ogg", false, 1.0, 0, 1, true);
AddTimer("", 30.0, "ResetMusic"); //Reset the music
}

I think it said it was 4 errors when the game crashed. Something with that a "boolean" (or something like that) value was needed, 1 said that the "asItem" wasn't declared, and the others said something else.

Thank you for taking your time!

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
05-28-2012, 03:11 PM
Find


Messages In This Thread
Amnesia Error, need help. - by Wapez - 05-28-2012, 03:11 PM
RE: Amnesia Error, need help. - by Putmalk - 05-28-2012, 04:26 PM



Users browsing this thread: 1 Guest(s)