Austums
Member
Posts: 60
Threads: 11
Joined: Mar 2011
Reputation:
0
|
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 |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
Austums
Member
Posts: 60
Threads: 11
Joined: Mar 2011
Reputation:
0
|
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 |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
RE: Quest_Parents_Text is not declared?
You forgot quotation marks :V
|
|
04-03-2011, 07:38 AM |
|
Austums
Member
Posts: 60
Threads: 11
Joined: Mar 2011
Reputation:
0
|
RE: Quest_Parents_Text is not declared?
...? Where?
DAHHH. Never mind. I'm dumb. 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 |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
RE: Quest_Parents_Text is not declared?
Did you put the right category for the entry?
|
|
04-03-2011, 08:28 AM |
|
Austums
Member
Posts: 60
Threads: 11
Joined: Mar 2011
Reputation:
0
|
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 |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
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 |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
Austums
Member
Posts: 60
Threads: 11
Joined: Mar 2011
Reputation:
0
|
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 |
|
|