MapSettings doesn't specify it returns userdata
Posted: Thu Oct 31, 2024 2:06 am
MapSettings turns out to return userdata.
I was under the false assumption that assigning a table to any of the MapSettings fields needs all the fields filled in. There might be a way to correct that assumption, but that's not what caught me so flat footed.
When I took a returned 'table', attempted to modify a single field in it, and then set the whole table to the field I got it from. It errored because what I gave it was in fact userdata.
Maybe this type of behavior is inherit to LuaStruct I just got told that's how LuaStruct is, so maybe we can get a page describing more about LuaStruct?
Either way, the clarification that you can assign to a field of the returned objects just fine would've been helpful.
I was under the false assumption that assigning a table to any of the MapSettings fields needs all the fields filled in. There might be a way to correct that assumption, but that's not what caught me so flat footed.
When I took a returned 'table', attempted to modify a single field in it, and then set the whole table to the field I got it from. It errored because what I gave it was in fact userdata.
Either way, the clarification that you can assign to a field of the returned objects just fine would've been helpful.