You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot set a cloud variable using this. The error I get is
(node:4069) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'set' of undefined
at CloudSession.setVariable (/rbd/pnpm-volume/e38efa70-1bc7-452e-891e-f660e6a03dfd/node_modules/.registry.npmjs.org/node-scratch-client/1.3.7/node_modules/node-scratch-client/src/Struct/CloudSession.js:35:27)
at cloud.connect.then (/app/server.js:41:9)
(node:4069) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4069) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
code:```js
const config = require("./config.json");
const scratch = require("node-scratch-client");
const Client = new scratch.Client({
username: config.username,
password: config.password
});
Client.login().then(() => {
let cloud = Client.session.createCloudSession(221003966);
cloud.connect().then(() => {
cloud.on("set", variable => {
console.log("Variable \""+variable.name+"\" changed to " + variable.value);
});
cloud.setVariable('☁ Test', 'Test')//seting her. ☁ Test exists
});
});```
The text was updated successfully, but these errors were encountered:
I cannot set a cloud variable using this. The error I get is
The text was updated successfully, but these errors were encountered: