Problem with my table script

I want to write a table with 4 values, as well as another value being added through a table.insert, which means about 5 values.

The issue is that when I run the script, the output says “table: 0xc73c173bba68a036”. When I click the output message, the highlighted line is print(MyTable)

I tried deleting table.insert to see if it would work but it didn’t. I added a # before MyTable in print(MyTable) but still no luck.

I am following a tutorial about tables by CodeBro29 and I have put down exactly what he has put down. For some reason, his code works and my code doesn’t.

The code:

-- 
local MyTable = {"Hello!",2,15,true}

table.insert(MyTable,"This is an added value!")

print(MyTable)

What seems to be the problem here?

Everything is working fine, that’s just the table address you’re getting in output. If you want to see the contents of the table, click the three dots in the corner of output and make sure Log Mode is turned off.
Screenshot 2023-11-22 221042

1 Like

Thanks! This solved my problem!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.