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
.Lang File Help Lang File not working?
Verkehr Offline
Member

Posts: 60
Threads: 13
Joined: Oct 2016
Reputation: 1
#1
Exclamation  Lang File not working?

I'm constantly having issues with my lang file as it won't work properly, and I tried my best to spot the mistake, but I can't see any? Any help please? Sad

    <CATEGORY Name="CustomStoryMain">
    <Entry Name="Description">Inside of this custom story, you play as a young scientist whose laboratorium got overrun by nightmares from his past. You have to stop them![br][br]The only way you could think of doing so is by creating a "potion of Life", a side result from an experiment you had. It's known that that potion would make any sins and nightmares go away, even the ones haunting you. However, you were late. The monsters bashed you in your head and you were unconscious for multiple hours. It's now or never, time to act!</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">

        //---Notes---//
        <Entry Name="Note_note1_1_Name">I salute you...</Entry>
        <Entry Name="Note_note1_1_Text">Robert Smith is the name, right?[br][br]I'm one of the nightmares that entered your house. However, do not fear, as I will not attack you. I have been already avenged by other people, but by spirit rules, I need to haunt 1 more house before I'm truly free.[br][br]I know that there are other spirits, and I can't fight aganst them, but I can help you beat them. Just follow my advice and ignore anything you see as good as you can and you'll be good to go.[br][br]-Your only friend</Entry>
//---Diaries---//
        //<Entry Name="Diary_DearDiary_Name1">End of the World</Entry>//
        //<Entry Name="Diary_DearDiary_Text1">21 December, 2012[br][br]The ground is literally shaking beneath my feet.</Entry>//

        //---Mementos---//
        //<Entry Name="Quest_MyMemento_Text">Perhaps I should go the other way.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Inventory">

        //---Item Names/Descriptions---//
        //<Entry Name="ItemName_DoorKey">A Key</Entry>//
        //<Entry Name="ItemDesc_DoorKey">It's for unlocking a door.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Sign">

        //---Signs---//
        //<Entry Name="SignStudy">Study Room</Entry>//
    </CATEGORY>
    <CATEGORY Name="Levels">

        //---Levels---//
        //<Entry Name="LevelHall">Main Hall</Entry>//
    </CATEGORY>
    <CATEGORY Name="DeathHint">

        //---Death Hints---//
        //<Entry Name="DHint1">You have to carry on...</Entry>//
    </CATEGORY>

No need to reply on this thread anymore, the glitch is fixed. Please be aware that any comments before the <LANGUAGE> tag will break the file! Make sure to remove any before posting a thread. Fix found by " Mudbill ".
(This post was last modified: 12-12-2017, 06:03 PM by Verkehr.)
12-10-2017, 09:09 PM
Find
tigerlillymaya13 Offline
Junior Member

Posts: 44
Threads: 8
Joined: Feb 2017
Reputation: 0
#2
RE: Lang File not working?

(12-10-2017, 09:09 PM)CritZOfficial Wrote: I'm constantly having issues with my lang file as it won't work properly, and I tried my best to spot the mistake, but I can't see any? Any help please? Sad

    <CATEGORY Name="CustomStoryMain">
    <Entry Name="Description">Inside of this custom story, you play as a young scientist whose laboratorium got overrun by nightmares from his past. You have to stop them![br][br]The only way you could think of doing so is by creating a "potion of Life", a side result from an experiment you had. It's known that that potion would make any sins and nightmares go away, even the ones haunting you. However, you were late. The monsters bashed you in your head and you were unconscious for multiple hours. It's now or never, time to act!</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">

        //---Notes---//
        <Entry Name="Note_note1_1_Name">I salute you...</Entry>
        <Entry Name="Note_note1_1_Text">Robert Smith is the name, right?[br][br]I'm one of the nightmares that entered your house. However, do not fear, as I will not attack you. I have been already avenged by other people, but by spirit rules, I need to haunt 1 more house before I'm truly free.[br][br]I know that there are other spirits, and I can't fight aganst them, but I can help you beat them. Just follow my advice and ignore anything you see as good as you can and you'll be good to go.[br][br]-Your only friend</Entry>
//---Diaries---//
        //<Entry Name="Diary_DearDiary_Name1">End of the World</Entry>//
        //<Entry Name="Diary_DearDiary_Text1">21 December, 2012[br][br]The ground is literally shaking beneath my feet.</Entry>//

        //---Mementos---//
        //<Entry Name="Quest_MyMemento_Text">Perhaps I should go the other way.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Inventory">

        //---Item Names/Descriptions---//
        //<Entry Name="ItemName_DoorKey">A Key</Entry>//
        //<Entry Name="ItemDesc_DoorKey">It's for unlocking a door.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Sign">

        //---Signs---//
        //<Entry Name="SignStudy">Study Room</Entry>//
    </CATEGORY>
    <CATEGORY Name="Levels">

        //---Levels---//
        //<Entry Name="LevelHall">Main Hall</Entry>//
    </CATEGORY>
    <CATEGORY Name="DeathHint">

        //---Death Hints---//
        //<Entry Name="DHint1">You have to carry on...</Entry>//
    </CATEGORY>

This is from a trouble shooting guide for level editor
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">
This is the description of my Custom Story! It is SCARY!
</Entry>
</CATEGORY>
</LANGUAGE>
(This post was last modified: 12-10-2017, 11:58 PM by tigerlillymaya13.)
12-10-2017, 11:45 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#3
RE: Lang File not working?

Well youre using the // operation incorrectly. There are different ways of commenting out a line of script from your files and youre using // as if its functioning as a /* */.

To have you understand what the code needs in order for you to comment out things properly, I'll provide an example where you've been using it incorrectly:


//<Entry Name="ItemName_DoorKey">A Key</Entry>//

^^^^^^
The first // operation will comment out the entire row regardless of whats infront of it, so the second // operation therefore will not do anything and is useless.

/*<Entry Name="ItemName_DoorKey">A Key</Entry>*/

^^^^^^
This operation allows you to specifically comment out a certain section in one line, instead of commenting out the entire line. How you want to approach commenting out things is subjective but if you wish to use // for it, you only have to make it look like this:

//<Entry Name="ItemName_DoorKey">A Key</Entry>

As for your code, I'm not sure if you chose not to include it or not but have you actually used <LANGUAGE> and </LANGUAGE> to close off the entire code? If not, be sure to surround the whole language file with those two lines of code, which will give you an end result like the following:

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
    <Entry Name="Description">Inside of this custom story, you play as a young scientist whose laboratorium got overrun by nightmares from his past. You have to stop them![br][br]The only way you could think of doing so is by creating a "potion of Life", a side result from an experiment you had. It's known that that potion would make any sins and nightmares go away, even the ones haunting you. However, you were late. The monsters bashed you in your head and you were unconscious for multiple hours. It's now or never, time to act!</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">

        //---Notes---//
        <Entry Name="Note_note1_1_Name">I salute you...</Entry>
        <Entry Name="Note_note1_1_Text">Robert Smith is the name, right?[br][br]I'm one of the nightmares that entered your house. However, do not fear, as I will not attack you. I have been already avenged by other people, but by spirit rules, I need to haunt 1 more house before I'm truly free.[br][br]I know that there are other spirits, and I can't fight aganst them, but I can help you beat them. Just follow my advice and ignore anything you see as good as you can and you'll be good to go.[br][br]-Your only friend</Entry>
//---Diaries---//
        //<Entry Name="Diary_DearDiary_Name1">End of the World</Entry>//
        //<Entry Name="Diary_DearDiary_Text1">21 December, 2012[br][br]The ground is literally shaking beneath my feet.</Entry>//

        //---Mementos---//
        //<Entry Name="Quest_MyMemento_Text">Perhaps I should go the other way.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Inventory">

        //---Item Names/Descriptions---//
        //<Entry Name="ItemName_DoorKey">A Key</Entry>//
        //<Entry Name="ItemDesc_DoorKey">It's for unlocking a door.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Sign">

        //---Signs---//
        //<Entry Name="SignStudy">Study Room</Entry>//
    </CATEGORY>
    <CATEGORY Name="Levels">

        //---Levels---//
        //<Entry Name="LevelHall">Main Hall</Entry>//
    </CATEGORY>
    <CATEGORY Name="DeathHint">

        //---Death Hints---//
        //<Entry Name="DHint1">You have to carry on...</Entry>//
    </CATEGORY>
</LANGUAGE>

Other than that, I cannot find anything wrong.

Derp.
12-11-2017, 02:08 AM
Find
Verkehr Offline
Member

Posts: 60
Threads: 13
Joined: Oct 2016
Reputation: 1
#4
RE: Lang File not working?

(12-11-2017, 02:08 AM)Neelke Wrote: Well youre using the // operation incorrectly. There are different ways of commenting out a line of script from your files and youre using // as if its functioning as a /* */.

To have you understand what the code needs in order for you to comment out things properly, I'll provide an example where you've been using it incorrectly:


//<Entry Name="ItemName_DoorKey">A Key</Entry>//

^^^^^^
The first // operation will comment out the entire row regardless of whats infront of it, so the second // operation therefore will not do anything and is useless.

/*<Entry Name="ItemName_DoorKey">A Key</Entry>*/

^^^^^^
This operation allows you to specifically comment out a certain section in one line, instead of commenting out the entire line. How you want to approach commenting out things is subjective but if you wish to use // for it, you only have to make it look like this:

//<Entry Name="ItemName_DoorKey">A Key</Entry>

As for your code, I'm not sure if you chose not to include it or not but have you actually used <LANGUAGE> and </LANGUAGE> to close off the entire code? If not, be sure to surround the whole language file with those two lines of code, which will give you an end result like the following:

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
    <Entry Name="Description">Inside of this custom story, you play as a young scientist whose laboratorium got overrun by nightmares from his past. You have to stop them![br][br]The only way you could think of doing so is by creating a "potion of Life", a side result from an experiment you had. It's known that that potion would make any sins and nightmares go away, even the ones haunting you. However, you were late. The monsters bashed you in your head and you were unconscious for multiple hours. It's now or never, time to act!</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">

        //---Notes---//
        <Entry Name="Note_note1_1_Name">I salute you...</Entry>
        <Entry Name="Note_note1_1_Text">Robert Smith is the name, right?[br][br]I'm one of the nightmares that entered your house. However, do not fear, as I will not attack you. I have been already avenged by other people, but by spirit rules, I need to haunt 1 more house before I'm truly free.[br][br]I know that there are other spirits, and I can't fight aganst them, but I can help you beat them. Just follow my advice and ignore anything you see as good as you can and you'll be good to go.[br][br]-Your only friend</Entry>
//---Diaries---//
        //<Entry Name="Diary_DearDiary_Name1">End of the World</Entry>//
        //<Entry Name="Diary_DearDiary_Text1">21 December, 2012[br][br]The ground is literally shaking beneath my feet.</Entry>//

        //---Mementos---//
        //<Entry Name="Quest_MyMemento_Text">Perhaps I should go the other way.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Inventory">

        //---Item Names/Descriptions---//
        //<Entry Name="ItemName_DoorKey">A Key</Entry>//
        //<Entry Name="ItemDesc_DoorKey">It's for unlocking a door.</Entry>//
    </CATEGORY>
    <CATEGORY Name="Sign">

        //---Signs---//
        //<Entry Name="SignStudy">Study Room</Entry>//
    </CATEGORY>
    <CATEGORY Name="Levels">

        //---Levels---//
        //<Entry Name="LevelHall">Main Hall</Entry>//
    </CATEGORY>
    <CATEGORY Name="DeathHint">

        //---Death Hints---//
        //<Entry Name="DHint1">You have to carry on...</Entry>//
    </CATEGORY>
</LANGUAGE>

Other than that, I cannot find anything wrong.

Since the extra_english.lang file I use is from Mudbill, there is only a 4 row long comment outside of the LANGUAGE sections.

//You can delete or add any lines that start with // if you wish. These are only comments
//made to help organize your file. Remember that some category names MUST NOT be changed,
//or else they won't work. For example CustomStoryMain and Journal must stay, but you're
//free to add any additional categories with your own names. Have fun! -Mudbill

<LANGUAGE>  
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">Inside of this custom story, you play as a young scientist whose laboratorium got overrun by nightmares from his past. You have to stop them![br][br]The only way you could think of doing so is by creating a "potion of Life", a side result from an experiment you had. It's known that that potion would make any sins and nightmares go away, even the ones haunting you. However, you were late. The monsters bashed you in your head and you were unconscious for multiple hours. It's now or never, time to act!</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">

        //---Notes---//
        <Entry Name="Note_note1_1_Name">I salute you...</Entry>
        <Entry Name="Note_note1_1_Text">Robert Smith is the name, right?[br][br]I'm one of the nightmares that entered your house. However, do not fear, as I will not attack you. I have been already avenged by other people, but by spirit rules, I need to haunt 1 more house before I'm truly free.[br][br]I know that there are other spirits, and I can't fight aganst them, but I can help you beat them. Just follow my advice and ignore anything you see as good as you can and you'll be good to go.[br][br]-Your only friend</Entry>

        //---Diaries---//
        /*<Entry Name="Diary_DearDiary_Name1">End of the World</Entry>*/
        /*<Entry Name="Diary_DearDiary_Text1">21 December, 2012[br][br]The ground is literally shaking beneath my feet.</Entry>*/

        //---Mementos---//
        /*<Entry Name="Quest_MyMemento_Text">Perhaps I should go the other way.</Entry>*/
    </CATEGORY>
    <CATEGORY Name="Inventory">

        //---Item Names/Descriptions---//
        /*<Entry Name="ItemName_DoorKey">A Key</Entry>*/
        /*<Entry Name="ItemDesc_DoorKey">It's for unlocking a door.</Entry>*/
    </CATEGORY>
    <CATEGORY Name="Sign">

        //---Signs---//
        /*<Entry Name="SignStudy">Study Room</Entry>*/
    </CATEGORY>
    <CATEGORY Name="Levels">

        //---Levels---//
        /*<Entry Name="LevelHall">Main Hall</Entry>*/
    </CATEGORY>
    <CATEGORY Name="DeathHint">

        //---Death Hints---//
        /*<Entry Name="DHint1">You have to carry on...</Entry>*/
    </CATEGORY>
</LANGUAGE>

Is this also better? Used /* */ instead of // //.

RIP this thread.

Also, // alone on the beginning didn't work for me either. Also wouldn't load.
(This post was last modified: 12-11-2017, 05:34 PM by Verkehr.)
12-11-2017, 05:33 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Lang File not working?

I found the issue. Apparently, starting the file with comments before the <LANGUAGE> tag messes up the parsing of the file. Remove all those 4 lines. I'll see to edit the template.
It's not an obvious issue, but apparently a very critical one.

(This post was last modified: 12-11-2017, 11:11 PM by Mudbill.)
12-11-2017, 11:10 PM
Find
Verkehr Offline
Member

Posts: 60
Threads: 13
Joined: Oct 2016
Reputation: 1
#6
RE: Lang File not working?

(12-11-2017, 11:10 PM)Mudbill Wrote: I found the issue. Apparently, starting the file with comments before the <LANGUAGE> tag messes up the parsing of the file. Remove all those 4 lines. I'll see to edit the template.
It's not an obvious issue, but apparently a very critical one.

Alright! That fixed it! Thanks, Mudbill!

Also, please consider replacing the comments inside of the files you provide, so that it doesn't repeat so much.
12-12-2017, 05:58 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#7
RE: Lang File not working?

Yep, the downloadable template is also updated.

12-13-2017, 09:03 PM
Find




Users browsing this thread: 3 Guest(s)