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!
|