Code: Select all
function text()
game.print("привет")
end
Code: Select all
function text()
game.print("hello")
end
Code: Select all
function text()
game.print("привет")
end
Code: Select all
function text()
game.print("hello")
end
Code: Select all
function text()
game.print("привет")
end
commands.add_command('russian','test',text)
Code: Select all
/c game.print("привет")
The function was created in a file control.luaeradicator wrote:Works fine for me for both of these:Code: Select all
function text() game.print("привет") end commands.add_command('russian','test',text)
Are you sure your text file is encoded in utf8?Code: Select all
/c game.print("привет")
No clue. Post the whole control.lua?WIZ4 wrote: But why the text does not appear if the function is written in control.lua?
Simply type "/russian" into the console. It's just a quick way to call a random function.WIZ4 wrote: And how to use this line?
commands.add_command('russian','test',text)
Um. But this worked just fine in control.luaRseding91 wrote:Thanks for the report. The version of Lua we use doesn't official support UTF8 text so when it parses the file contents from disk it doesn't translate the string correctly.
When you do the same through console it's using a different method of parsing which sometimes works.
We may update the version of Lua we use in 0.17 to one that supports UTF8 but for now you just can't use direct non-ascii characters in Lua files.
Code: Select all
function text()
game.print("привет")
end
commands.add_command('russian','test',text)