Using LANGUAGE...
Posted: Wed Sep 13, 2017 11:11 am
Hi all, I returned here and have a brand new question:
How do I use LANGAUGE defined messages in string array?
Here's the sample script:
It's intended to display scenery messages. Think something like in fallout 1&2. I want to use LANGUAGE lump to ease use of translations. But I don't know how to use it in array - the array is required to make the messages random. But I don't know how to define the LANGUAGE variables into an array. Can anyone help me?
The example here displays only "$SCN_CORN01 - 5".
How do I use LANGAUGE defined messages in string array?
Here's the sample script:
Code: Select all
script "cornMessage" (void)
{
int messCornNr;
messCornNr = random(1,5);
str messCorn[6] = { "",
"$SCN_CORN01", <- this display what is defined -> "$SCN_CORN01", not the string in LANGUAGE
"$SCN_CORN02",
"$SCN_CORN03",
"$SCN_CORN04",
"$SCN_CORN05"
};
if (messCornNr == messCornNr)
{
Print(s:messCorn[messCornNr]);
}
}
The example here displays only "$SCN_CORN01 - 5".