Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Need help with arrays in this firebase plugin
- Original author: Sodium89
- Original date: June 17, 2020
- Source thread: https://forums.rpgmakerweb.com/threads/need-help-with-arrays-in-this-firebase-plugin.122978/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support
Summary
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:
Archived First Post
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]);
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...