Document how the first index in a table determines if replication treats it as an array or a dictionary

The remote limitations article describes a number of limitations that apply differently between arrays and key-value paired dictionaries. As far as I can tell, the key factor is whether or not the table has a value stored at [1]. If it does, the table is treated as an array, and all entries with non-numeric keys are discarded. If it doesn’t, the table is treated as a dictionary, and all keys are converted to strings. This behavior should be explicitly documented.

9 Likes

Since time of this posting, we’ve updated the article around avoiding mixed tables, and with avoiding nil values for any index. Does the updated article still miss some key aspect? If so, can you please include some code samples that show what you’re seeing and what isn’t clearly documented? Thanks!

IgnisRBX

1 Like

On top of this post, I wanted to add something that I think seems important (though I can make a separate post if necessary, do let me know)

The documentation on RemoteEvents should also include information on byte-overheads for sending specific datatypes, for optimization purposes. (Etc a string takes up certain amount of bytes when sent during a remote event)

There’s already a community resource post for it, but I think it’s extremely important information to include considering RemoteEvents are highly used, and transfer a lot of information. (Meaning it’s easy to send a lot of data)