A BUG about language.【Auto】


ZeroCiel
  • Pending

First...

I think I need to say hello to you.

I've been fretting about this for a while.

When users start their game,

After entering the cave and then exiting the game, the game will crash.

I thought the code was wrong.

But it's not...

 

In my actual survey, the famine code had a function to determine the player's language.

Code:

local Musha_language = "_en"
if Modlanguage == "auto" then
local KnownModIndex = GLOBAL.KnownModIndex
for _, moddir in ipairs(KnownModIndex:GetModsToLoad()) do
local language = KnownModIndex:GetModInfo(moddir).name
--start
if language == "한글 모드 서버 버전" or language == "한글 모드 클라이언트 버전" or language == "Korean Language Pack Ver.Server" then 
    Musha_language = "_ko"
elseif language == "Chinese Language Pack" or language == "Chinese Plus" or language == "[DST]雪儿的外置汉化模组" or language == "中文语言包" then
    Musha_language = "_cn"
elseif language == "Russian Language Pack" or language == "Russification Pack for DST" or language == "Rus To Latin (Client)" then
    Musha_language = "_ru"
end 
end
else
Musha_language = Modlanguage
end
STRINGS.CHARACTERS.MUSHA = require("speech_musha"..Musha_language)
modimport("scripts/strings_musha"..Musha_language..".lua")

 

This is the code for the mod.(Musha)

But the language code will write Chinese or English parameters.

If the player USES the Chinese system or the English system.

Take it easy! Please hear me out, Sir.

 

I'm not sure Kiel going to support that,

However, the function returns an incorrect language code for the game causing the game to crash,

I guess it has to do with the language system.

I'd like you to look into the language code if you can.

I think it's convenient for users,

Automatically select their game language..

Thanks for your understanding!

 

client_log.txt

client_log-test.txt

Code.png

Error.png


Steps to Reproduce
1.Use the musha And Create a game with caves 2.Exit the game directly after entering the cave. (Only the client side has this problem.?) 3.It crashes when the game is reloaded. Local modules are not affected,But you can't determine what's wrong with the Auto function.


User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now