colyseus / colyseus-defold

⚔ Colyseus SDK for Defold Engine
https://docs.colyseus.io/getting-started/defold-client/
MIT License
60 stars 10 forks source link

Sometimes I got this error #57

Closed baochungit closed 3 months ago

baochungit commented 3 months ago
ERROR:SCRIPT: colyseus/serialization/schema/types/map_schema.lua:76: table index is nil
stack traceback:
  colyseus/serialization/schema/types/map_schema.lua:76: in function delete_by_index
  colyseus/serialization/schema/schema.lua:636: in function decode
  colyseus/serialization/schema.lua:25: in function patch
  colyseus/room.lua:238: in function patch
  colyseus/room.lua:172: in function _on_message
  colyseus/room.lua:69: in function listener
  colyseus/eventemitter.lua:80: in function emit
  colyseus/connection.lua:57: in function <colyseus/connection.lua:40>
endel commented 3 months ago

Hi @baochungit, thank you for reporting. I believe this one can be fixed in the same way we've fixed with arrays a few weeks ago: https://github.com/colyseus/colyseus-defold/commit/d10df2c108055b642c7000c62b9ee37ddc6dfe46 can you confirm applying this change works as expected? Cheers

baochungit commented 3 months ago

Looks like that is it.. I'm still using v0.15.8 :d

endel commented 3 months ago

Let's keep this open... The map_schema.lua file needs that same patch we've applied on array_schema.lua