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
Quest won't load and getting a huge error
Urkel Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2012
Reputation: 0
#1
Quest won't load and getting a huge error

I'm currently working on my first Amnesia Custom Story and just began scripting quests for it.
I've added 3 quests to my first map, and one of them won't load. It's supposed to trigger when entering an area but it simply wont.

I'm also getting a huge error when entering my second map (noob.map): http://i44.tinypic.com/fp358w.jpg

My map file: http://www.mediafire.com/?zyclkble4db37m0

Extra_english.lang
Spoiler below!
<LANGUAGE>

<CATEGORY Name = "CustomStoryMain">
<Entry Name="Description">Spooky time...</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_A1_Name">Doctor's Note</Entry>
<Entry Name="Note_A1_Text">Doctor's Note date 1833 24th June.[br][br] I finally to escape these god forsaken monsters. They've been chasing me ever since I created them... Unthankful bastards!</Entry>
<Entry Name="Note_A2_Name">Weird behavior</Entry>
<Entry Name="Note_A2_Text">Still 1833 24th June.[br][br] Don't really know why I am writing these notes... I am the only human for a thousand miles. Oh, and if you happend to find a key in this room, don't use it to open the next door, weird shit might happen.</Entry>
<Entry Name="Note_A3_Name">Concerning the coffin</Entry>
<Entry Name="Note_A3_Text">1833 23rd June[br][br] A brunt found me hiding, I had to escape through the tunnel and get to my working place.</Entry>
<Entry Name="Quest_IsDoctorHere_Text">There might be a key this room here somewhere...</Entry>
<Entry Name="Quest_ExloreArea_Text">Exlore this room.</Entry>
<Entry Name="Quest_opendoor_Text">Open the Locked Door with the key you just acquired.</Entry>

<Entry Name="Quest_LockedDoor2_Text">Open the Locked Door with the key you just acquired.</Entry>
<Entry Name="Quest_BreakBoards_Text">Need to find something to break those boards.</Entry>
<Entry Name="Quest_LockedDoor1_Text">Need to find a key to unlock this room.</Entry>
</CATEGORY>

<CATEGORY Name="Hints">
<Entry Name="DeathServantBrute_1">Shut the door. There's a draft...</Entry>
<Entry Name="DeathServantBrute_2">Run...</Entry>
</CATEGORY>
<CATEGORY Name="Quest">
<Entry Name="QuestCompleted">QUEST COMPLETED</Entry>
<Entry Name="QuestAdded">QUEST ADDED</Entry>
</CATEGORY>

<CATEGORY Name="Messages">
<Entry Name="DoorLocked">You need a key.</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key1">Key to Working Place</Entry>
<Entry Name="ItemDesc_Key1">Tag reads "Working Place".</Entry>
<Entry Name="ItemName_Key_2">Key to get the Hell out of here.</Entry>
<Entry Name="ItemDesc_Key_2">Tag reads "Hell".</Entry>
<Entry Name="ItemName_Key_3">Key to outside</Entry>
<Entry Name="ItemDesc_Key_3">Tag reads "Outside".</Entry>
<Entry Name="ItemName_nyckel_1">Key to appartment</Entry>
<Entry Name="ItemDesc_nyckel_1">Tag reads "'Appartment'".</Entry>
<Entry Name="ItemName_supermobnyckel">Key to Death Pain Room of Impending Doom.</Entry>
<Entry Name="ItemDesc_supermobnyckel">Tag reads "Pain Room".</Entry>

</CATEGORY>

<CATEGORY Name="Strangeness">
<Entry Name="Intro">The Plane?[br]I remember now...[br]The shearing of metal...[br]The rush of wind as the plane ripped itself apart...[br]And yet everyone is calm...[br]The oxygen they gave us caused that...[br]Made us docile...[br]Accepted of our fate...[br]Our inevitable end...</Entry>
<Entry Name="Arrival">Where...[br]What is this place?[br]How did I get here?</Entry>
<Entry Name="Hallucination">That... monster?![br]It destroyed the doors...[br]But it wasn't real...</Entry>
<Entry Name="EmotionStone_1">I can't place it but it was like I was there but wasn't...</Entry>
</CATEGORY>

<CATEGORY Name="EmotionStone">
<Entry Name="EmotionStone_1">The experiment failed, I have created a monster...[br][br]"This is a delicate procedure, it ain't a laughing matter."</Entry>
</CATEGORY>

<CATEGORY Name="Ending">
<Entry Name="Credits">This is only the beginning...[br][br][br][br][br][br][br]Level Design, Scripting, Story[br]Dark88[br][br][br][br]Thanks to[br][br]Frictional Games for making this game,[br][br][br]and Frictional Forum Community for helping out with scripting,[br][br][br]and You for playing...</Entry>
</CATEGORY>
</LANGUAGE>

Danger Ahead (QQ2 won't load when entering ScriptArea_1)
Spoiler below!


////////////////////////////
// Run when entering map
void OnEnter()
{
SetEntityCallbackFunc("Key_3", "QQ3");
SetMessage("Strangeness", "Arrival", 5);
AddEntityCollideCallback("Player", "Area1", "Area1Sound", false, 0);
AddEntityCollideCallback("Player", "Area1", "Area1Hit", false, 0);
PlayMusic("07_amb.ogg", true, 1.0f, 0, 0, true);
AddUseItemCallback("", "Key1", "mansion_2", "KeyOnDoor", true);
AddUseItemCallback("", "Key_2", "mansion_1", "KeyOnDoor2", true);
AddUseItemCallback("", "Key_3", "dorr_3", "KeyOnDoor3", true);
SetEntityPlayerLookAtCallback("", "nolook", true);
PreloadParticleSystem("ps_orb_shockwave.ps");
AddEntityCollideCallback("Player", "Mob_remove", "removemob", false, 0);
PreloadParticleSystem("ps_dust_impact.ps");
SetEntityPlayerInteractCallback("Key_3", "QQ3", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "QQ2", false, 0);
if (GetSwingDoorLocked("dorr_3") == true)
{
SetEntityPlayerInteractCallback("dorr_3", "AddMessage1", true);
}
if (GetSwingDoorLocked("mansion_2") == true)
{
SetEntityPlayerInteractCallback("mansion_2", "QQ1", true);
}
if (GetSwingDoorLocked("mansion_1") == true)
{
SetEntityPlayerInteractCallback("mansion_1", "AddMessage1", true);
}

}

////////////////////////////
// Run when leaving map
void OnLeave()
{
SetEntityActive("Mob_1" , false);
}

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

void turn(string &in asTimer)
{
ShowEnemyPlayerPosition("Mob_1");
}

void removemob(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1" , false);
}

void Area1Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("","amb_alert.snt", "Area2", 1, false);
PlaySoundAtEntity("","water_lurker_attack.snt", "servant_brute_1", 1, false);
SetEntityActive("servant_brute_1" , true);
}




void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_2", 0.0f, true);
RemoveItem("Key1");
GiveSanityBoost();
CompleteQuest("Quest_1", "IsDoctorHere");
}

void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("Key_2");
GiveSanityBoost();
}

void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("dorr_3", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "dorr_3", 0.0f, true);
RemoveItem("Key_3");
PlaySoundAtEntity ("","explosion_rock_large.snt", "SoundArea", 1, false);
SetEntityActive("Mob_1" , true);
SetLightVisible("PointLight_3", true);
StartPlayerLookAt("Mob_1", 4, 4, "");
CreateParticleSystemAtEntity("", "ps_orb_shockwave.ps", "Mob_1", false);
AddTimer("", 2, "nolook");
AddTimer("", 1, "turn");
CompleteQuest("Quest_2", "ExploreArea");
CompleteQuest("Quest_3", "opendoor");
}

/////////////////////////
////Quests & Messages////

void QQ2(string &in entity)
{
AddQuest("Quest_2", "ExloreArea");
}

void QQ3(string &in entity)
{
AddQuest("Quest_3", "opendoor");
}

void QQ1(string &in entity)
{
SetMessage("Messages", "DoorLocked", 5);
AddQuest("Quest_1", "IsDoctorHere");
}

void AddMessage1(string &in entity)
{
SetMessage("Messages", "DoorLocked", 5);
}





Noob.hps
Spoiler below!
////////////////////////////
// Run when entering map
void OnEnter()
{
SetEntityCallbackFunc("nyckel_1", "OnPickup");
AddUseItemCallback("", "nyckel_1", "dorr_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Hammare_1", "planka_1", "UseHammerOnBoards", true);
AddUseItemCallback("", "supermobnyckel", "supermobdorr", "SuperMobWithKey", true);
SetEntityCallbackFunc("supermobnyckel", "Spiderfunc");
AddEntityCollideCallback("Player", "grunt_area_1", "Gruntlook", false, 0);
AddEntityCollideCallback("Player", "door_close_1", "door_close", false, 0);
AddEntityCollideCallback("Player", "Mobstart", "Mobstart_1", false, 0);
AddEntityCollideCallback("Player", "superscript", "onemoredoor", false, 0);
AddEntityCollideCallback("Player", "ScriptArea_1", "secretwallscript", false, 0);
PreloadParticleSystem("ps_orb_room_agrippa_end_effect.ps");
if (GetSwingDoorLocked("dorr_1") == true)
{
SetEntityPlayerInteractCallback("dorr_1", "StartQ_Noob_1", true);
SetEntityPlayerInteractCallback("dorr_1", "AddMessage1", true);
}
if (GetEntityExists("Wooden_Boards") == true)
{
SetEntityPlayerInteractCallback("planka_1", "StartQ_Noob_2", true);
}
}

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

void secretwallscript(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 2, "tittabort_3");
StartPlayerLookAt("secretwall_1", 5, 5, "");
SetEntityActive("ScriptArea_1", false);
}

void tittabort_3(string &in asTimer)
{
SetLampLit("secretlamp_1", true, false);
SetLampLit("secretlamp_2", true, false);
StopPlayerLookAt();
SetEntityActive("secretwall_1", false);
GiveSanityBoost();
SetEntityActive("secretwall_2", false);
CreateParticleSystemAtEntity("", "ps_orb_room_agrippa_end_effect.ps", "secretwall_1", false);
}


void onemoredoor(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("supermobdorr_2", true);
SetEntityActive("servant_brute_1", false);
PlaySoundAtEntity("","insanity_whisper.snt", "supermobdorr_2", 1, false);
GiveSanityBoost();
SetEntityActive("ScriptArea_1", true);
SetEntityActive("superscript", false);
}

void Mobstart_1(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("supermobdorr_1", 5, 5, "");
AddTimer("Sluta_titta", 2, "tittabort_2");
SetEntityActive("servant_brute_1", true);
SetEntityActive("Mobstart", false);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0.1f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0.1f, "");
SetEntityActive("superscript", true);
}


void door_close(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("supermobdorr_1", true, true);
SetSwingDoorClosed("supermobdorr_1", true, true);
PlaySoundAtEntity("","close_door.snt", "supermobdorr_1", 1, false);
GiveSanityBoost();
StartPlayerLookAt("supermobdorr_1", 5, 5, "");
AddTimer("Sluta_titta", 2, "tittabort_2");
SetEntityActive("door_close_1", false);
}

void torchscream(string &in asTimer)
{
SetLampLit("supertorch_1", true, false);
SetLampLit("supertorch_2", true, false);
SetSwingDoorLocked("supermobdorr_1", false, true);
PlaySoundAtEntity("","scare_male_terrified.snt", "supermobdorr_1", 1, false);
StartPlayerLookAt("supermobdorr_1", 5, 5, "");
AddTimer("Sluta_titta", 3, "tittabort_2");
GiveSanityDamage(15, true);
}

void doorcloses(string &in asTimer)
{
SetSwingDoorClosed("supermobdorr", true, true);
SetSwingDoorLocked("supermobdorr", true, true);
PlaySoundAtEntity("","close_door.snt", "supermobdorr", 1, false);
GiveSanityDamage(15, true);
StartPlayerLookAt("supermobdorr", 5, 5, "");
AddTimer("Sluta_titta", 1, "tittabort_2");
}

void Gruntlook(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(15, true);
StartPlayerLookAt("grunt_look_1", 5, 5, "");
PlaySoundAtEntity("","scare_ghost.snt", "grunt_look_1", 1, false);
AddTimer("Sluta_titta", 2, "tittabort_2");
AddTimer("dorrclose", 4, "doorcloses");
AddTimer("", 6, "torchscream");
SetEntityActive("grunt_area_1", false);
}

void tittabort(string &in asTimer)
{
SetEntityActive("Spider1", false);
SetEntityActive("Spider2", false);
SetEntityActive("Spider3", false);
SetEntityActive("Spider4", false);
SetEntityActive("supermob", false);
StopPlayerLookAt();
}

void UseHammerOnBoards (string &in asitem, string &in asEntity)
{
SetEntityActive("planka_1", false);
SetEntityActive("planka_2", true);
RemoveItem("Hammare_1");
SetSwingDoorLocked("hammardorr", false, true);
AutoSave();
CompleteQuest("Quest_2", "BreakBoards");
}

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 4, "");

}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("dorr_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "dorr_1", 0, false);
RemoveItem("nyckel_1");
CompleteQuest("Dorr1Noob", "LockedDoor1");
}

void SuperMobWithKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("supermobdorr", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "dorr_1", 0, false);
RemoveItem("supermobnyckel");
}

void Spiderfunc(string &in asEntity, string &in type)
{
SetEntityActive("Spider1", true);
SetEntityActive("Spider2", true);
SetEntityActive("Spider3", true);
SetEntityActive("Spider4", true);
SetEntityActive("supermob", true);
StartPlayerLookAt("supermob", 5, 5, "");
AddTimer("", 3, "tittabort");
GiveSanityDamage(15, true);
}

////////////////////////////
Quests & Comments


void Quest_Noob_2(string &in entity)
{
AddQuest("Quest_2", "BreakBoards");
}

void Quest_Noob_1(string &in entity)
{
AddQuest("Dorr1Noob", "LockedDoor1");
}

void AddMessage1(string &in entity)
{
SetMessage("Messages", "DoorLocked", 5);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
(This post was last modified: 02-04-2012, 04:43 PM by Urkel.)
02-04-2012, 04:41 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Quest won't load and getting a huge error

What is this?

<CATEGORY Name="Quest">

<Entry Name="QuestCompleted">QUEST COMPLETED</Entry>

<Entry Name="QuestAdded">QUEST ADDED</Entry>

</CATEGORY>

and link the hpl.log for each map when crashing Smile

02-04-2012, 05:42 PM
Find
Urkel Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2012
Reputation: 0
#3
RE: Quest won't load and getting a huge error

hpl.log said:

ERROR: Unable to open config file 'MainEditorSettings.cfg'! Invalid filepointer returned!


and my Extra_English.lang file is taken from someone elses map, and changed so all strings fits my map, don't know what the QuestCompleted entry means :<
02-04-2012, 05:58 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Quest won't load and getting a huge error

(02-04-2012, 05:58 PM)Urkel Wrote: hpl.log said:

ERROR: Unable to open config file 'MainEditorSettings.cfg'! Invalid filepointer returned!


and my Extra_English.lang file is taken from someone elses map, and changed so all strings fits my map, don't know what the QuestCompleted entry means :<
hmm... strange



02-04-2012, 06:03 PM
Find
Urkel Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2012
Reputation: 0
#5
RE: Quest won't load and getting a huge error

More help appriciated! :>
02-04-2012, 09:57 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#6
RE: Quest won't load and getting a huge error

I am not sure if it is cause, but:

QQ2 -> remove that 2. I think that if you use numbers in function it might cause errors. Try to use like: QQTwo instead, or something like that. I am not sure, but give it a try Smile

/// Ignore above, it is only if function starts with number Tongue

Anyway, when you use collide callback, then later in function you need to use:

void FunctionName(string &in asParent, string &in asChild, int alState)

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 02-04-2012, 10:07 PM by Elven.)
02-04-2012, 10:04 PM
Find
Urkel Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2012
Reputation: 0
#7
RE: Quest won't load and getting a huge error

(02-04-2012, 10:04 PM)Elven Wrote: I am not sure if it is cause, but:

QQ2 -> remove that 2. I think that if you use numbers in function it might cause errors. Try to use like: QQTwo instead, or something like that. I am not sure, but give it a try Smile

/// Ignore above, it is only if function starts with number Tongue

Anyway, when you use collide callback, then later in function you need to use:

void FunctionName(string &in asParent, string &in asChild, int alState)

Yes this fixed the second quest!
But the gigantic error still remains when starting the second map Noob.map Sad

02-04-2012, 10:42 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#8
RE: Quest won't load and getting a huge error

////////////////////////////
Quests & Comments

Before Quests & Comments must be // as well to make it comment Smile
(line 180)

The Interrogation
Chapter 1

My tutorials
02-04-2012, 10:54 PM
Find
Urkel Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2012
Reputation: 0
#9
RE: Quest won't load and getting a huge error


When I enter noob.map, I now get the error
main (178, 1) : ERR : Expected '('

row 178 is:



void Quest_Noob_2(string &in asParent, string &in asChild, int alState)
{
AddQuest("Quest_2", "BreakBoards");
}

any ideas?
(02-04-2012, 10:54 PM)Elven Wrote: ////////////////////////////
Quests & Comments

Before Quests & Comments must be // as well to make it comment Smile
(line 180)
Yes, this works now! Thank you! Big Grin


(This post was last modified: 02-04-2012, 11:00 PM by Urkel.)
02-04-2012, 10:55 PM
Find




Users browsing this thread: 1 Guest(s)