Lua converts UserData into a string

I am trying to print out some userdata as a string, but the lua documentation is rather weak to non-existent. How to convert the userdata variable to a string so that it can be written to a file?
ToString (user data)

The creator of the userdata must provide_ _tostring meta method.

I am trying to print some userdata as a string, but Lua’s documentation is rather weak to non-existent. How to convert userdata variable to string To write it to a file?

ToString (user data)

The creator of the userdata must provide the __tostring meta method.

Leave a Comment

Your email address will not be published.