Scripts log errors: Could not deserialize data

With Release v1.65.0 I introduced a bug that caused scripts to give errors such as:

Could not deserialize data {“id”:“xxx”, … } to type Char. Make sure to add the correct decorators to classes. at ~lib/json-as/assembly/index.ts:254:7

This only affected room scripts updated after the release. Thanks to Ace, @Shinyuu and @farcaller, I got to track it down with my sniffer, and eliminate it!

How to fix your code

Scripts created in game console

Make a tiny update to the script with:

set roomscript myBrokenScript : source = // Updated script

Scripts created with mucklet-script

Install the latest version (v1.65.2) of mucklet-script and deploy again. Example:

cd myBrokenProject
npm install mucklet-script@latest
npm run deploy

Bug issue

1 Like

It’s ok, I already rewrote the code in blessed C, faked the assemblyscript memory management and used the resulting wasm.

</sarcasm> :smiley:

(thanks for fixing this!)

1 Like

squinting eyes

… with you, I am not entire sure you actually wouldn’t try to do such a thing :wink: