Frictional Games Forum (read-only)

Full Version: Extra_english.lang
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello! I'm posting this for some help about the extra_english file. I have been playing with the level editor and scripting for a while, and I tried to make an actual cs now. It went fine, but suddenly as I added a few names to inventory category in the lang file, it "broke".. My custom story's description doesn't load, neither does any of the note texts/names or item names. So yeah. Here is my extra_english file(Sorry for it being my language):
---------------------------
<LANGUAGE>
<RESOURCES>
</RESOURCES>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Sinun nimesi on Mika. Tulit juuri kotiin illalla, ja poikasi Jere on kateissa.[br] Mitä mahtaa olla tekeillä?</Entry>
</CATEGORY>

<CATEGORY Name="Messages">
<Entry Name="body1">... [br][br][br]Hän.... Hän on kuollut? ... Minun pitää käydä kellarissa selvittämässä, mitä täällä tapahtuu.</Entry>
<Entry Name="outside">Minulla ei ole syytä mennä ulos..</Entry>
<Entry Name="wall1">[br][br][br][br][br]Hmm. Vaikuttaa heikolta. Tarvitsisin vaikka vasaran..</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_hammer1">Vasara</entry>
<Entry Name="ItemDesc_hammer1">Se on vasara..</entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_firstnote_Name">Älä huoli</entry>
<Entry Name="Note_firstnote_Text">Olen siirtämässä tavaroita kellarista varastohuoneen tyhjiin hyllyihin.[br]-Jere</entry>
</CATEGORY>



</LANGUAGE>
------------------
I tried to look for some errors myself, didn't just find any, so if you could help, i'd appreciate alot.
(10-23-2013, 05:42 PM)Omenapuu Wrote: [ -> ]Hello! I'm posting this for some help about the extra_english file. I have been playing with the level editor and scripting for a while, and I tried to make an actual cs now. It went fine, but suddenly as I added a few names to inventory category in the lang file, it "broke".. My custom story's description doesn't load, neither does any of the note texts/names or item names. So yeah. Here is my extra_english file(Sorry for it being my language):
---------------------------
<LANGUAGE>
<RESOURCES>
</RESOURCES>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Sinun nimesi on Mika. Tulit juuri kotiin illalla, ja poikasi Jere on kateissa.[br] Mitä mahtaa olla tekeillä?</Entry>
</CATEGORY>

<CATEGORY Name="Messages">
<Entry Name="body1">... [br][br][br]Hän.... Hän on kuollut? ... Minun pitää käydä kellarissa selvittämässä, mitä täällä tapahtuu.</Entry>
<Entry Name="outside">Minulla ei ole syytä mennä ulos..</Entry>
<Entry Name="wall1">[br][br][br][br][br]Hmm. Vaikuttaa heikolta. Tarvitsisin vaikka vasaran..</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_hammer1">Vasara</entry>
<Entry Name="ItemDesc_hammer1">Se on vasara..</entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_firstnote_Name">Älä huoli</entry>
<Entry Name="Note_firstnote_Text">Olen siirtämässä tavaroita kellarista varastohuoneen tyhjiin hyllyihin.[br]-Jere</entry>
</CATEGORY>



</LANGUAGE>
------------------
I tried to look for some errors myself, didn't just find any, so if you could help, i'd appreciate alot.

You have "</entry" on the end of the journal and inventory.lang scripts.
You need to change all of your "</entry>" to "</Entry>

So it looks like this:


<CATEGORY Name="Inventory">
<Entry Name="ItemName_hammer1">Vasara</Entry>
<Entry Name="ItemDesc_hammer1">Se on vasara..</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_firstnote_Name">Älä huoli</Entry>
<Entry Name="Note_firstnote_Text">Olen siirtämässä tavaroita kellarista varastohuoneen tyhjiin hyllyihin.[br]-Jere</Entry>
</CATEGORY>


Otherwise, I'm not noticing any other errors.
[/quote]

You have "</entry" on the end of the journal and inventory.lang scripts.
You need to change all of your "</entry>" to "</Entry>

So it looks like this:


<CATEGORY Name="Inventory">
<Entry Name="ItemName_hammer1">Vasara</Entry>
<Entry Name="ItemDesc_hammer1">Se on vasara..</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_firstnote_Name">Älä huoli</Entry>
<Entry Name="Note_firstnote_Text">Olen siirtämässä tavaroita kellarista varastohuoneen tyhjiin hyllyihin.[br]-Jere</Entry>
</CATEGORY>


Otherwise, I'm not noticing any other errors.
[/quote]

Oh, didn't notice that. Yeah sorry for bothering, and thanks alot for the quick answer :-)
You're welcome! ^^ did everything work okay?
(10-23-2013, 08:14 PM)T122002 Wrote: [ -> ]You're welcome! ^^ did everything work okay?

Yeah, but I'm screwing up again. Now as I got over it, I made some other, a little more complicated things with the .hps file.. I know there are probably just small mistakes I don't notice, but when I try to load up my custom story, it says that it's unexpected ending, and here it is.. :C

----------------------------------------------------
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "react2", true, 1);
AddUseItemCallback("hammer1", "stone_hammer_1", "passage1", "impact1", false);
SetLocalVarInt("usehammer1", 1);
SetEntityPlayerInteractCallback("lantern_1", "lantern", true);
}
void OnEnter()
{

}
void OnLeave()
{

}
void break1(string &in asEntity)
{
SetMessage("Messages", "wall1", 3.0);
}
void impact1(string &in asItem, string &in asEntity)
{
if(GetLocalVarInt("usehammer1") == 1)
(
SetLocalVarInt("usehammer1", 2);
SetMessage("Messages", "Hammerfirst", 3.0);
SetEntityActive("servant_grunt_1, true);
)
else if(GetLocalVarInt("usehammer1") == 2)
(
SetEntityActive("passage1", false);
SetEntityActive("passage2", true);
PlayGuiSound("05_rock_fall.snt", 100);
CreateParticleSystemAtEntity("dust1", "ps_dust_falling_door.ps", "passage2", false);
AddTimer("dust1", 3.0, "dust1");
)
}
void dust1(string &in asTimer)
{
DestroyParticleSystem("dust1");
}
void lantern(string &in asEntity)
{
SetPlayerLampOil(25.0);
}
-----------------------
I'm pretty tired so I can't focus really the maxium, so I'm missing something I guess... Thanks if you can help again, I honestly want to get this working Smile PS. the spaces aren't like that, copy & paste just failing
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "react2", true, 1);
AddUseItemCallback("hammer1", "stone_hammer_1", "passage1", "impact1", false);
SetLocalVarInt("usehammer1", 1);
SetEntityPlayerInteractCallback("lantern_1", "lantern", true);
}
void OnEnter()
{

}
void OnLeave()
{

}
void break1(string &in asEntity)
{
SetMessage("Messages", "wall1", 3.0);
}
void impact1(string &in asItem, string &in asEntity)
{
if(GetLocalVarInt("usehammer1") == 1)
(
SetLocalVarInt("usehammer1", 2);
SetMessage("Messages", "Hammerfirst", 3.0);
SetEntityActive("servant_grunt_1", true);
)
else if(GetLocalVarInt("usehammer1") == 2)
(
SetEntityActive("passage1", false);
SetEntityActive("passage2", true);
PlayGuiSound("05_rock_fall.snt", 100);
CreateParticleSystemAtEntity("dust1", "ps_dust_falling_door.ps", "passage2", false);
AddTimer("dust1", 3.0, "dust1");
)
}
void dust1(string &in asTimer)
{
DestroyParticleSystem("dust1");
}
void lantern(string &in asEntity)
{
SetPlayerLampOil(25.0);
}


You forgot a quotation mark (") in servant_grunt_1 Wink
(10-23-2013, 08:47 PM)The chaser Wrote: [ -> ]void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "react2", true, 1);
AddUseItemCallback("hammer1", "stone_hammer_1", "passage1", "impact1", false);
SetLocalVarInt("usehammer1", 1);
SetEntityPlayerInteractCallback("lantern_1", "lantern", true);
}
void OnEnter()
{

}
void OnLeave()
{

}
void break1(string &in asEntity)
{
SetMessage("Messages", "wall1", 3.0);
}
void impact1(string &in asItem, string &in asEntity)
{
if(GetLocalVarInt("usehammer1") == 1)
(
SetLocalVarInt("usehammer1", 2);
SetMessage("Messages", "Hammerfirst", 3.0);
SetEntityActive("servant_grunt_1", true);
)
else if(GetLocalVarInt("usehammer1") == 2)
(
SetEntityActive("passage1", false);
SetEntityActive("passage2", true);
PlayGuiSound("05_rock_fall.snt", 100);
CreateParticleSystemAtEntity("dust1", "ps_dust_falling_door.ps", "passage2", false);
AddTimer("dust1", 3.0, "dust1");
)
}
void dust1(string &in asTimer)
{
DestroyParticleSystem("dust1");
}
void lantern(string &in asEntity)
{
SetPlayerLampOil(25.0);
}


You forgot a quotation mark (") in servant_grunt_1 Wink

Yeah, a small but enough big mistake to ruin a whole file :I but haha, thats how coding works, thanks alot mate Smile
You also used parentheses for control statement code blocks. That should cause another syntax error.
(10-23-2013, 08:54 PM)Your Computer Wrote: [ -> ]You also used parentheses for control statement code blocks. That should cause another syntax error.

Yeah, I fixed that by myself when it told me the errors. I was already wondering when I watched a tutorial about "if else" statements, why he used () instead of {} Wink
But thanks anyway for trying to help