Script.post "Invalid JSON Data" Error

I’ve been trying to organize some of my scripts so I can share code between many scripts intended for different rooms. I can’t tell if I’m just going too many functions deep, it doesn’t like how I used namespaces, or that I’m calling Script.post from imported code but sometimes Script.post throws an “invalid json data” when the code previously had no issue.

There’s an error with the version of json-as that earlier versions of muclet-script, make sure to update mucklet-script to version 1.65.1 1.65.2 or later and it should start working again.

Edit: my mistake, thanks Accipiter!

I’m already using 1.65.1

The JSON deserialization issue was resolved in Mucklet Script v1.65.2 (not v1.65.1).

So, try do a:

npm install mucklet-script@latest

If the problem remains, it may be something else. Though, then I would probably need to look at your code to get a better understanding.

I just updated it but I’m still getting that error.

I also tried helping Ace with an issue he was having with the lock_outside example script earlier today but I couldn’t figure it out. He was getting ‘error parsing script: “exitAction.cancel” is not exported in module “env”’