Hello!
I've been using this firebase-oriented plugin but I notice it can't handle strings in arrays. This is something I really need.
The database can store strings in arrays so I assume it's an issue with the plugin
If I do something like this:
◆Script:$gameVariables.setValue($gameVariables.value(2), [0, $gameVariables.value(1), 0, 0, 0, 0]);
:Script:var fs = require('fs');
:Script:$gameVariables.value($gameVariables.value(2))[0]=fs.readFileSync('file1.txt','utf8');
But in the database it's like this:
View attachment 147957
Plugin:
github.com
EDIT: ^^; I made an error with the script call. I was complicating things by setting the value and then updating it. This time I set the value all together. While my initial script call worked in-game, it never really got updated in the database for some reason.
This is a better way:
◆Script:fetch(`file.txt`)
:Script: .then(response =>
:Script: response.text().then(text => {
:Script: $gameVariables.setValue(1, text)
:Script: })
:Script: )
:Script:$gameVariables.setValue($gameVariables.value(2), [$gameVariables.value(1), 4, 0, 0, 0, 0]);
I've been using this firebase-oriented plugin but I notice it can't handle strings in arrays. This is something I really need.
The database can store strings in arrays so I assume it's an issue with the plugin
If I do something like this:
◆Script:$gameVariables.setValue($gameVariables.value(2), [0, $gameVariables.value(1), 0, 0, 0, 0]);
:Script:var fs = require('fs');
:Script:$gameVariables.value($gameVariables.value(2))[0]=fs.readFileSync('file1.txt','utf8');
But in the database it's like this:
View attachment 147957
Plugin:
GitHub - krmbn0576/mosimosido
Contribute to krmbn0576/mosimosido development by creating an account on GitHub.
EDIT: ^^; I made an error with the script call. I was complicating things by setting the value and then updating it. This time I set the value all together. While my initial script call worked in-game, it never really got updated in the database for some reason.
This is a better way:
◆Script:fetch(`file.txt`)
:Script: .then(response =>
:Script: response.text().then(text => {
:Script: $gameVariables.setValue(1, text)
:Script: })
:Script: )
:Script:$gameVariables.setValue($gameVariables.value(2), [$gameVariables.value(1), 4, 0, 0, 0, 0]);