One of the error messages on incorrect usage of game.player.print states: Invalid literal type (boolean) in localisedstring, table, string or number type expected.
Apart from the fact that it cannot print bool, it can also be inferred from this message that it can print tables, but invocation with table also results into error about unknown keys. (even if the table consists of localised strings)
Could there be some clarification on that?
(Was the previous thread silently moved to help or it was me missing a board?)
edit: nevermind, a table of localised strings worked I've just missed the category when referencing it, sorry.
[0.12.2]game.player.print table
[0.12.2]game.player.print table
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: [0.12.2]game.player.print table
I'm a little confused here – what's the bug, exactly?
Re: [0.12.2]game.player.print table
Function usage hint:
Don't bother though , it's my bad. I've figured out later, that a table there stands for a table of localised strings, for which function works correctly.
edit: Sorry, that's me again actually function only prints the first element of table:
I've put results of my experiments on game.player.print() on wiki. Could we please get corrections on that?
mentions tables but function can't print them.Invalid literal type (boolean) in localisedstring, table, string or number type expected
Don't bother though , it's my bad. I've figured out later, that a table there stands for a table of localised strings, for which function works correctly.
edit: Sorry, that's me again actually function only prints the first element of table:
Code: Select all
/c game.player.print({'entity-name.gun-turret', 'entity-name.laser-turret'})
edit: I feel silly now.Gun turret
I've put results of my experiments on game.player.print() on wiki. Could we please get corrections on that?
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: [0.12.2]game.player.print table
Actually, it has to be always in the {} brackets when it is localised string. The wiki was just plain wrong. I fixed the wiki.