Message buffer size too small for table

hi!

I’m getting this error:

ERROR:SCRIPT: /script.gui_script:52: buffer (9 bytes) too small for table, exceeded at value (number) for element #1
stack traceback:
[C]: in function ‘post’
/script.gui_script:52: in function ‘loadlev’
/script.gui_script:518: in function </script.gui_script:214>

Presumably because my message is too big. Should I use a lua module to get round this?

1 Like

Yes. What kind of message are you sending? Do you really need to send a big message or could you send a reference/id/key to the data instead of the data itself (and use a Lua module to look up the data on the other end)?

2 Likes

Yes, what @britzl suggests, use a Lua module to handle the level data, and keep messages small.
The maximum message size is 512kb, and it does of course have a large overhead if one sends those messages all the time.

3 Likes

I’m basically trying to copy a group of nodes from one GUI scene to another. Right now, I’m sending the rotation, position, and size of each node. Another possibility would be cloning nodes from one GUI scene to another. I will see what I can do