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
Script Help Error with memento
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#1
Error with memento

I created the memento.
1.Memento is writed on start level, not when i go to the script area.
2.When i click "M" to see memento's there isn't a memento. One text: "Memento isn't avaiable."

What i must do?
This is hps file:

void OnStart()
{
AddQuest("memento1", "Quest_Castle1_Text");
CompleteQuest("memento1", "Quest_Castle1_Text");
AddEntityCollideCallback("Player", "MessageScript1", "Message1", true, 1);
}

void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "DanielSay1", 10);
}


This is a journal lines from .lang file:

<CATEGORY Name="Journal">

<Entry Name="Note_note1_Name">
Info dla sluzby
</Entry>

<Entry Name="Note_note1_Text">
Droga Sluzbo, [br][br] Przepraszam za rozbicie okna, ale pojawil sie jakis stwor. Zaczal mnie atakowac, i rozbijajac okno, wypadl z niego. Mysle ze bladzi gdzies po lesie, ale nie wiem gdzie. Jestem ciekaw, do kogo nalezal zamek. Znalazlem w bibliotece ksiazke, i pisze tam ze zostal wybudowany w 1482r. Mamy teraz 1622r. wiec mozemy sie tylko domyslac. Znalezlismy jakiegos czlowieka w zrujnowanym sanktuarium. Byl bardzo slaby. Powiedzial tylko: [br][br] "Nazywam sie Alexander" i "Zabijcie Daniela" [br][br] O co mu chodzilo? Nie wiem. Jeszcze raz przepraszam za rozbicie okna.
</Entry>

<Entry Name="Note_note2_Name">
Ogloszenie
</Entry>

<Entry Name="Note_note2_Text">
Dnia 3.09.1986r.-5.09.1986r. Elektrownia zamknieta.
</Entry>

<Entry Name="Note_note_Name">
The End...
</Entry>

<Entry Name="Note_note_Text">

<Entry Name="Quest_Castle1_Text">Dostan sie do zamku</Entry>

</Entry>

</CATEGORY>

What i must do? Please help me.
(This post was last modified: 11-18-2014, 01:27 PM by MaksoPL.)
11-18-2014, 01:12 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Error with memento

Remove this line:
CompleteQuest("memento1", "Quest_Castle1_Text");


When you use "AddQuest" you add the memento to the mementos.
When you use "CompleteQuest" you remove it.

In your OnStart you used both AddQuest and CompleteQuest, which means you both added and removed the memento again

Trying is the first step to success.
11-18-2014, 02:01 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Error with memento

Quote:<Entry Name="Note_note_Text">

Be sure to put an </Entry> after that somewhere before the next <Entry Name...> as well. Otherwise, your text will be blank.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
11-18-2014, 02:13 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Error with memento

You want the memento to be added when you activate the collide callback? To do that, you must move the AddQuest line inside the callback block, like so:

PHP Code: (Select All)
void OnStart()
{
    
//CompleteQuest("memento1", "Quest_Castle1_Text");//Remove this line.
    
AddEntityCollideCallback("Player""MessageScript1""Message1"true1);
}

void Message1(string &in asChildstring &in asParentint alState)
{
    
AddQuest("memento1""Castle1");//Move this here. Also, don't include the Quest_ and _Text parts.
    
SetMessage("Messages""DanielSay1"10); 


That will add the quest once you hit the area. The CompleteQuest script will remove the quest, so only use that when you've finished the task it's hinting to. As I also said, don't use the prefix and suffix for the memento in the script. Only use that in the .lang file.

11-18-2014, 02:34 PM
Find
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#5
RE: Error with memento

I do everything what you say. And i click "M" for mementos and isn't name of memento or mementos isn't avaiable. In mementos only is "-". What i must do? I know, this error in .lang file. This is my .lang file:
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Testing</Entry>
</CATEGORY>
</LANGUAGE>

</CATEGORY>

<CATEGORY Name="Journal">

<Entry Name="Note_note1_Name">
Info dla sluzby
</Entry>

<Entry Name="Note_note1_Text">
Droga Sluzbo, [br][br] Przepraszam za rozbicie okna, ale pojawil sie jakis stwor. Zaczal mnie atakowac, i rozbijajac okno, wypadl z niego. Mysle ze bladzi gdzies po lesie, ale nie wiem gdzie. Jestem ciekaw, do kogo nalezal zamek. Znalazlem w bibliotece ksiazke, i pisze tam ze zostal wybudowany w 1482r. Mamy teraz 1622r. wiec mozemy sie tylko domyslac. Znalezlismy jakiegos czlowieka w zrujnowanym sanktuarium. Byl bardzo slaby. Powiedzial tylko: [br][br] "Nazywam sie Alexander" i "Zabijcie Daniela" [br][br] O co mu chodzilo? Nie wiem. Jeszcze raz przepraszam za rozbicie okna.
</Entry>

<Entry Name="Note_note2_Name">
Ogloszenie
</Entry>

<Entry Name="Note_note2_Text">
Dnia 3.09.1986r.-5.09.1986r. Elektrownia zamknieta.
</Entry>

<Entry Name="Note_note_Name">
The End...
</Entry>

<Entry Name="Note_note_Text">

<Entry Name="Quest_Castle1_Text">Dostan sie do zamku</Entry>

</Entry>

</CATEGORY>

<CATEGORY Name="Messages">
<Entry Name="DanielSay1">Gdzie ja jestem?</Entry>

</CATEGORY>

</LANGUAGE>
11-18-2014, 03:46 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Error with memento

(11-18-2014, 03:46 PM)MaksoPL Wrote: I do everything what you say.

You forgot this:

(11-18-2014, 02:13 PM)Romulator Wrote:
Quote:<Entry Name="Note_note_Text">

Be sure to put an </Entry> after that somewhere before the next <Entry Name...> as well. Otherwise, your text will be blank.

11-18-2014, 04:39 PM
Find
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#7
RE: Error with memento

(11-18-2014, 04:39 PM)Mudbill Wrote:
(11-18-2014, 03:46 PM)MaksoPL Wrote: I do everything what you say.

You forgot this:

(11-18-2014, 02:13 PM)Romulator Wrote:
Quote:<Entry Name="Note_note_Text">

Be sure to put an </Entry> after that somewhere before the next <Entry Name...> as well. Otherwise, your text will be blank.

Now isn't a notes, descriptions and mementos.
11-18-2014, 04:50 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Error with memento

I don't really know what you mean by that.

You see the part right here?
PHP Code: (Select All)
<Entry Name="Note_note_Text">

<
Entry Name="Quest_Castle1_Text">Dostan sie do zamku</Entry>

</
Entry

The issue here is that the </Entry> tag is too far down. You must close an entry before opening another. Since the entry is empty anyway, you might as well just remove it.

Get rid of the Note_note_text line and the bottom </Entry> tag.

(This post was last modified: 11-18-2014, 07:21 PM by Mudbill.)
11-18-2014, 07:20 PM
Find




Users browsing this thread: 2 Guest(s)