Frictional Games Forum (read-only)

Full Version: [Solved] Lang file not working!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I possibly don't know what's making it not work, I name it extra_english.lang and when i go in my custom story, the description is not working or any lang in it. does anybody see anything wrong in my lang file which is making it not work?

Code:
<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">Your name is Richard Anderson and you live in a city. You're a Journalist and You love reading and writing about all kinds of castles. Today in the newspaper you heard that there was this castle that is haunted and abandoned. No one dares to enter it, but you decide to.....</Entry>
    </CATEGORY>

<CATEGORY Name="Journal">
        <Entry Name="Note_HiddenKey_Name">Hidden Key</Entry>
        <Entry Name="Note_18thJuly1968_Name">18th July 1968</Entry>
        <Entry Name="Note_DrunkMen_Name">Drunk Men</Entry>
        <Entry Name="Note_Theworstdayever_Name">The worst day ever</Entry>
        <Entry Name="Note_HiddenKey_Text">[voices Voice2.ogg][br]14th July 1921[br] [br] That slave of mine keeps stealing food everytime from the Food Storage without even asking my permission.[br] Because of that I'm going to let him starve for months or years.So I told my guards to take him into the dungeon and torture him![br] That slave is too stupid that he can't even read![br] [br] Not even this note. So I hid the key of the "Food Storage" somewhere in this room.[br] [br] Your Master.[br] Abbán</Entry>
        <Entry Name="Note_DrunkMen_Text">18th July 1928[br] [br] I have told my men not to drink wine in the Food Cellar becsue it's posionous. They thought I lied so I kept watching them drink that wine until they choke by the poison. One day I found my son drinking that wine, It had been too late before I could tell him not to.[br] First my daughter died then my son.[br] How much can I take more of this?[br] [br] I'm alone..</Entry>
        <Entry Name="Note_18thJuly1968_Text"> [br] My castle has finally been built, it might have took some some years but it's finally done.[br] I told my guards to guard the outdoor gates so no pesky men can come in and steal all of my preciuous jewellery that I found in some ancient caves. Also I repeatedly told my children not to go play outside, it's too dangerous, there can be dangerous men I told them[br][br] Luckily I have well trained dogs which can scare away the men that come close to my castle.</Entry>
        <Entry Name="Note_Theworstdayever_Text">[voices Voice1.ogg][br]23rd August 1925[br] [br] Today was the day that my heart stopped beating because...[br] my daughter died, she didn't deserve it![br] It made me cry that day that I couldn't stop thinking about her, In my sleep, when I'm eating and when I'm writing.[br] [br] So I told my guards to take her corpse to the Crypt.[br] Let her rest in peace.</Entry>
        <Entry Name="Quest_pickuplantern_Text">The lantern has a little fuel in it, I might need to find more oil if I have to walk in some dark areas.</Entry>
        <Entry Name="Quest_touchhatch_Text">The hatch is jammed shut, maybe there's another way to unlock it.</Entry>
        <Entry Name="Quest_enterarea_Text">Find a way out of the cell.</Entry>
    </CATEGORY>

<CATEGORY Name="Inventory">
        <Entry Name="ItemName_TestItem">Food Storage Key</Entry>
        <Entry Name="ItemName_DeskCabinetNeedle">Desk Cabinet Needle</Entry>
        <Entry Name="ItemName_CellKey">Cell Key</Entry>
        <Entry Name="ItemDesc_TestItem">This is the key of the "Food Storage"</Entry>
        <Entry Name="ItemDesc_DeskCabinetNeedle">This is a Needle to unlock the Desk Cabinet.</Entry>
        <Entry Name="ItemDesc_CellKey">This key is the way out of this cell.</Entry>
    </CATEGORY>

<CATEGORY Name="Levels">
        <Entry Name="FoodStorage">Food Storage</Entry>
        <Entry Name="MasterBedroom">Master Bedroom</Entry>
        <Entry Name="DungeonCells">Dungeon Cells</Entry>
        <Entry Name="DungeonCells">Dungeon Cells</Entry>

    </CATEGORY>

<CATEGORY Name="CustomCatLevels">
        <Entry Name="CustomEntryLevel">The food storage is locked. I need the food storage key to open this.</Entry>
        <Entry Name="CustomEntryLevel">I don't need to go back.</Entry>
    </CATEGORY>


    <CATEGORY Name="Messages">
<Entry Name ="Message">It won't budge, maybe there's another way to unlock it.</Entry>
<Entry Name ="Test">I have seen these Dungeon Cells before when I was young.[br] [br] I've seen it with my dad when we where exploring the castle.[br] But I was too scared.</Entry>
</CATEGORY>

   <CATEGORY Name="Flashback">
        <Entry Name ="Flash1_1">What is this dad?</Entry>    

</Entry>

        <Entry Name ="Flash1_2">It's a Dungeon my son, you can turn on your lantern if you wish, it's quite dark down here.</Entry>    

</Entry>
        
    </CATEGORY>

</LANGUAGE>
This part right here
Code:
[voices Voice2.ogg]
Should have "voice" not "voices."

If that is not it, perhaps you have an illegal character somewhere. At least you have an error that is causing the lang to not load.

Edit: In your Flashback category, you have 2 </Entry> after each entry. Remove one of each.
It's still not working Huh

I did everything that you did in the flashback tutorial but my lang doesn't seem to work at all for unknown reason.

here is the updated lang file.

Code:
<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">Your name is Richard Anderson and you live in a city. You're a Journalist and You love reading and writing about all kinds of castles. Today in the newspaper you heard that there was this castle that is haunted and abandoned. No one dares to enter it, but you decide to.....</Entry>
    </CATEGORY>

<CATEGORY Name="Journal">
        <Entry Name="Note_18thJuly1968_Name">18th July 1968</Entry>
        <Entry Name="Note_18thJuly1968_Text"> [br] My castle has finally been built, it might have took some some years but it's finally done.[br] I told my guards to guard the outdoor gates so no pesky men can come in and steal all of my preciuous jewellery that I found in some ancient caves. Also I repeatedly told my children not to go play outside, it's too dangerous, there can be dangerous men I told them[br][br] Luckily I have well trained dogs which can scare away the men that come close to my castle.</Entry>
        <Entry Name="Quest_pickuplantern_Text">The lantern has a little fuel in it, I might need to find more oil if I have to walk in some dark areas.</Entry>
        <Entry Name="Quest_touchhatch_Text">The hatch is jammed shut, maybe there's another way to unlock it.</Entry>
        <Entry Name="Quest_enterarea_Text">Find a way out of the cell.</Entry>
    </CATEGORY>

<CATEGORY Name="Inventory">
        <Entry Name="ItemName_TestItem">Food Storage Key</Entry>
        <Entry Name="ItemName_DeskCabinetNeedle">Desk Cabinet Needle</Entry>
        <Entry Name="ItemName_CellKey">Cell Key</Entry>
        <Entry Name="ItemDesc_TestItem">This is the key of the "Food Storage"</Entry>
        <Entry Name="ItemDesc_DeskCabinetNeedle">This is a Needle to unlock the Desk Cabinet.</Entry>
        <Entry Name="ItemDesc_CellKey">This key is the way out of this cell.</Entry>
    </CATEGORY>

<CATEGORY Name="Levels">
        <Entry Name="FoodStorage">Food Storage</Entry>
        <Entry Name="MasterBedroom">Master Bedroom</Entry>
        <Entry Name="DungeonCells">Dungeon Cells</Entry>
        <Entry Name="DungeonCells">Dungeon Cells</Entry>

    </CATEGORY>

<CATEGORY Name="CustomCatLevels">
        <Entry Name="CustomEntryLevel">The food storage is locked. I need the food storage key to open this.</Entry>
        <Entry Name="CustomEntryLevel">I don't need to go back.</Entry>
    </CATEGORY>


    <CATEGORY Name="Messages">
<Entry Name ="Message">It won't budge, maybe there's another way to unlock it.</Entry>
<Entry Name ="Test">I have seen these Dungeon Cells before when I was young.[br] [br] I've seen it with my dad when we where exploring the castle.[br] But I was too scared.</Entry>
</CATEGORY>

   <CATEGORY Name="Flashback">
        <Entry Name ="Flash1_1">What is this dad?</Entry>    
</Entry>    <Entry Name ="Flash1_2">It's a Dungeon my son, you can turn on your lantern if you wish, it's quite dark down here.</Entry>    
    </CATEGORY>
</LANGUAGE>


It started not working after I added the flashback category
Try this.

<CATEGORY Name="Flashback">
<Entry Name ="Flash1_1">What is this dad?</Entry>
<Entry Name ="Flash1_2">It's a Dungeon my son, you can turn on your lantern if you wish, it's quite dark down here.</Entry>
</CATEGORY>
</LANGUAGE>

Replace your flashback category with this.
nope it's still not working :'(
I used Apjjm's Lang Tool to find out the exact cause of this problem. It pinpoints me to Line 11, Position 504, the line below is where the editor said the error was.
Code:
Your Master.[br] Abbán</Entry>

Why did I pinpoint it here? Because it says of an invalid character so I instantly tagged it here. It seems like the .lang files CANNOT take in special characters.
there isn't any
Code:
Your Master.[br] Abbán</Entry>
in my lang file, I can't find it. That was just a little part of my note, but I removed it since I am not going to use that note. but I can't find it in my lang file.
Code:
<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">Your name is Richard Anderson and you live in a city. You're a Journalist and You love reading and writing about all kinds of castles. Today in the newspaper you heard that there was this castle that is haunted and abandoned. No one dares to enter it, but you decide to.....</Entry>
    </CATEGORY>

<CATEGORY Name="Journal">
        <Entry Name="Note_18thJuly1968_Name">18th July 1968</Entry>
        <Entry Name="Note_18thJuly1968_Text"> [br] My castle has finally been built, it might have took some some years but it's finally done.[br] I told my guards to guard the outdoor gates so no pesky men can come in and steal all of my preciuous jewellery that I found in some ancient caves. Also I repeatedly told my children not to go play outside, it's too dangerous, there can be dangerous men I told them[br][br] Luckily I have well trained dogs which can scare away the men that come close to my castle.</Entry>
        <Entry Name="Quest_pickuplantern_Text">The lantern has a little fuel in it, I might need to find more oil if I have to walk in some dark areas.</Entry>
        <Entry Name="Quest_touchhatch_Text">The hatch is jammed shut, maybe there's another way to unlock it.</Entry>
        <Entry Name="Quest_enterarea_Text">Find a way out of the cell.</Entry>
    </CATEGORY>

<CATEGORY Name="Inventory">
        <Entry Name="ItemName_TestItem">Food Storage Key</Entry>
        <Entry Name="ItemName_DeskCabinetNeedle">Desk Cabinet Needle</Entry>
        <Entry Name="ItemName_CellKey">Cell Key</Entry>
        <Entry Name="ItemDesc_TestItem">This is the key of the "Food Storage"</Entry>
        <Entry Name="ItemDesc_DeskCabinetNeedle">This is a Needle to unlock the Desk Cabinet.</Entry>
        <Entry Name="ItemDesc_CellKey">This key is the way out of this cell.</Entry>
    </CATEGORY>

<CATEGORY Name="Levels">
        <Entry Name="FoodStorage">Food Storage</Entry>
        <Entry Name="MasterBedroom">Master Bedroom</Entry>
        <Entry Name="DungeonCells">Dungeon Cells</Entry>
        <Entry Name="DungeonCells">Dungeon Cells</Entry>

    </CATEGORY>

<CATEGORY Name="CustomCatLevels">
        <Entry Name="CustomEntryLevel">The food storage is locked. I need the food storage key to open this.</Entry>
        <Entry Name="CustomEntryLevel">I don't need to go back.</Entry>
    </CATEGORY>


    <CATEGORY Name="Messages">
<Entry Name ="Message">It won't budge, maybe there's another way to unlock it.</Entry>
<Entry Name ="Test">I have seen these Dungeon Cells before when I was young.[br] [br] I've seen it with my dad when we where exploring the castle.[br] But I was too scared.</Entry>
</CATEGORY>

   <CATEGORY Name="Flashback">
        <Entry Name ="Flash1_1">What is this dad?</Entry>    
   <Entry Name ="Flash1_2">It's a Dungeon my son, you can turn on your lantern if you wish, it's quite dark down here.</Entry>    
    </CATEGORY>
</LANGUAGE>

There you go. That's the correct .lang file. As it turns out there was an extra </Entry> mark and it didn't matched to anything. So I deleted it and the Lang Editor recognized it.
Thanks you Justanotherplayer and the others for helping me, it's working now Smile and thank you Mudbill for the flashback tutorial, the flashback is working perectly
Special characters are not allowed in the lang file because of parsing complications. You can however use a code to represent a special charater.

Code:
&#x0026;

This represents the Ampersand character (&). This one in particular is probably easier to get with &amp; but it looks the same. To use another character you can edit the 4 digits. There should be some lists you can use to find out what is what.

http://en.wikipedia.org/wiki/List_of_XML...references