Send() cannot be called from outside the script property

Hi, everyone.

I want to use scripts to save data to the server. I wrote the following script in the onValue property of a tap button:

browseFile({
  extension: "json",
  mode: "save"
}, (path)=>{
  send("127.0.0.1:6666", "/saveCfg", path, "some data...")
})

I want to pass the path of browseFile() to the custom module of the server through the callback function.But I encountered this error:

Uncaught send() cannot be called from outside the script property
at http://192.168.1.121:8080/client/open-stage-control-client.js?__OSC_ASSET__=1&version=1.25.2:1408:1165
(no stacktrace available)

How can I avoid this error? Did I miss something? Thanks for any help.

Looks like you found a bug ! I'll look into and try to cut a patch release as soon as possible.

1 Like

We should make a community badge when someone finds a bug. "Bug Catcher!" :beetle:

2 Likes