Search found 2 matches
- Thu Jan 03, 2019 11:42 am
- Forum: Modding help
- Topic: Possible bug in get_contents() on LuaTransportLine
- Replies: 4
- Views: 1029
Re: Possible bug in get_contents() on LuaTransportLine
If you are printing the raw
value in the console, the game will parse it like a localised string which gives that error. You need to use something to format the table, like serpent.block in the code posted by DaveMcW.
Yes, the problem was with formatting the output. Now it works as expected ...
- Thu Jan 03, 2019 9:59 am
- Forum: Modding help
- Topic: Possible bug in get_contents() on LuaTransportLine
- Replies: 4
- Views: 1029
Possible bug in get_contents() on LuaTransportLine
I'm trying to get content and quantity of items on belt with following command:
game.player.selected.get_transport_line(1).get_contents()
while hovering the cursor over belt with content. According to docs, return value should be in form of dictionary string β uint
but I'm getting following ...
game.player.selected.get_transport_line(1).get_contents()
while hovering the cursor over belt with content. According to docs, return value should be in form of dictionary string β uint
but I'm getting following ...