I am trying to print out a value from a table, but I keep getting the error that is in the title.
The error says it is trying to get the length of the integer, but I did not ask for this, I just wanted it to print the value.
I am not sure how to solve this.
--coin.lua local M = {} M.coinXY = { {xPos = 100, yPos = 100} } return M --spawncoin.lua local coin = require "coin" local M = {} function M.createCoin(parent) for i = 1, #coin.coinXY do print("The X position is: " .. tostring(#coin.coinXY[i].xPos)) end end return M
Thanks in advance!
PS: If @roaminggamer reads this, I received the same error when performing a table dump.