First of all, thank you, Sangar and other developers, for updating this incredible mod! I love it!
So I tried to print values of table (just in educational purpose) which gives the method
component.tank_controller.getFluidInTank(4)
4 is the left side of the Adapter where I put Tank Controller Upgrade. As I understand, this method contains so called "nested table". It gives us this:
then it's possible to get that value and print it (thanks Harkole!). But when I tried that way of getting value of nested table in Lua interpreter, I got nil:
su=222
su2 =333
th=452
th2 =349
sec ={su, su2}
third ={th, th2}
first ={sec, third}
print(first[1].su)
As I understand getFluidInTank() gives some special type of nested table, which is impossible to print like "normal" nested tables? This is complete riddle and mystery for me, please enlighten me!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
First of all, thank you, Sangar and other developers, for updating this incredible mod! I love it!
So I tried to print values of table (just in educational purpose) which gives the method
4 is the left side of the Adapter where I put Tank Controller Upgrade. As I understand, this method contains so called "nested table". It gives us this:
Ok, I tried to print nested table in ordinary Lua interpreter. This code works fine and prints 222:
But when I tried the same way in the game I have got nil:
By hard googling I finally found that if we print
then it's possible to get that value and print it (thanks Harkole!). But when I tried that way of getting value of nested table in Lua interpreter, I got nil:
As I understand getFluidInTank() gives some special type of nested table, which is impossible to print like "normal" nested tables? This is complete riddle and mystery for me, please enlighten me!
Edited by Crafter38*uPdating
Link to post
Share on other sites