Variable global

hi everyone, I'm trying to create a global variable but it is registered as an object and not as a value, what can I do?
Example I would like the output of the "file_iniziale" variable to be the same format as the "file" variable

thanks for all

Dont write an object to it?

show us how you set this global variable & we will show you how to get the internal file value.

1 Like

Please post these as code/text not images and I will show you exactly how to correct this.

(I cannot edit text in an image & and I don't feel like rewriting it everything :wink:)

1 Like

What are you trying to do in function 42?

Can you replace all this confusing code with this?
global.set("file_iniziale", msg.payload)

Which should result in global.file_iniziale == "change" (or whatever is in msg.payload)

1 Like

sorry I'm stupid I solved the problem by removing the function of the first image
var file {}
file: msg.payload
thanks for all

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.