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_Parents_Text is not declared? [SOLVED]
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#1
Quest_Parents_Text is not declared? [SOLVED]

So, I'm trying to make it so when a player moves into a Script Area, the memento appears.

void OnStart()
{
   AddTimer("CreepyMusic", 0, "CreepyMusic");
   AddUseItemCallback("CellarDoorKey1Func", "CellarDoorKey1", "CellarDoor1", "CellarDoorKey1Func", true);
   AddEntityCollideCallback("Player", "Quest1", "Quest1Func", true, 1);
}
void CreepyMusic(string &in asTimer)
{
   PlayMusic("06_amb.ogg", true, 7, 3, 0, true);
}
void CellarDoorKey1Func(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("CellarDoor1", false);
    RemoveItem("CellarDoorKey1");
    PlaySoundAtEntity("unlocking", "unlock_door.snt", "Player", 0, true);
}
void Quest1Func(string &in asParent, string &in asChild, int alState)
{
    AddQuest(Quest_Parents_Text, Quest_Parents_Text);
}

Instead, when I enter the map, it gives me an error saying "main (19, 34) : ERR : 'Quest_Parents_Text' is not declared"

D: It all LOOKS right...
(This post was last modified: 04-03-2011, 04:09 PM by Austums.)
04-03-2011, 07:22 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Quest_Parents_Text is not declared?

Your AddQuest function is incorrect.

It should be:

AddQuest("name", "Parents");

Parents I assume is what the description is in your quest's entry in the extra_english.lang file, right? If so, it should appear like this in your lang file

<Entry Name="Quest_Parents_Text">Quest memento here!</Entry>

"name" is the name of the quest which is used by the engine for when you want to, say, complete the quest, or check if said quest is actually in the mementos page.

04-03-2011, 07:26 AM
Find
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#3
RE: Quest_Parents_Text is not declared?

Parents is the name of my Memento, like so:

<CATEGORY Name="Journal">

      <Entry Name="Quest_Parents_Text">I have to see if my parents are okay.</Entry>

</CATEGORY>
04-03-2011, 07:28 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#4
RE: Quest_Parents_Text is not declared?

You forgot quotation marks :V
04-03-2011, 07:38 AM
Find
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#5
RE: Quest_Parents_Text is not declared?

...? Where?


DAHHH. Never mind. I'm dumb. Tongue Silly syntax.
Uh oh, now the map runs fine, and the memento is added, but when I look at it, it's just a

-

And nothing else.
(This post was last modified: 04-03-2011, 07:53 AM by Austums.)
04-03-2011, 07:50 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#6
RE: Quest_Parents_Text is not declared?

Did you put the right category for the entry?
04-03-2011, 08:28 AM
Find
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#7
RE: Quest_Parents_Text is not declared?

Yeah,

<CATEGORY Name="Journal">

      <Entry Name="Quest_Parents_Text">I have to see if my parents are okay.</Entry>

</CATEGORY>
04-03-2011, 08:50 AM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#8
RE: Quest_Parents_Text is not declared?

Here's what mine looks like, it works, use it as a reference if it helps:

extra_english.lang
<CATEGORY Name="Journal">

<Entry Name="Quest_CrowBarQuest_Text">The door's blocked by weak planks of wood. Maybe I can find something to pry them off?</Entry>

</CATEGORY>

script (map.hps)

void OnStart()
{
AddEntityCollideCallback("Player", "AreaCrowBarQuest_1", "AddCrowBarQuest", true, 1);
}

void AddCrowBarQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("crowbarquest", "CrowBarQuest");
}
(This post was last modified: 04-03-2011, 08:59 AM by Russ Money.)
04-03-2011, 08:59 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#9
RE: Quest_Parents_Text is not declared?

Quests are mementos, which don't have an Entry for their "title". As such you don't need two entires in the lang file, just one (the actual memento text)

If I'm incorrect in this, I while give myself a thousand lashings, dealt with the fiery passion of two hundred suns. AKA I'm not entirely sure but the scripts I've looked at and the lang files don't point to quests having a name entry.

04-03-2011, 02:56 PM
Find
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#10
RE: Quest_Parents_Text is not declared?

Solved. I just had to change it from

void Quest1Func(string &in asParent, string &in asChild, int alState)
{
    AddQuest(Quest_Parents_Text, Quest_Parents_Text);
}

to

void AddQuest1(string &in asParent, string &in asChild, int alState)
{
    AddQuest("Parents", "Parents");
}

Thanks for the help everybody!
04-03-2011, 04:09 PM
Find




Users browsing this thread: 1 Guest(s)