Hello! new snapper here, i’ve been playing around with all the different blocks. And I cant seem to figure out how to store data using the Database blocks?
Could anyone give me an explanation of how these work in a nutshell of some sorts?
Hello! new snapper here, i’ve been playing around with all the different blocks. And I cant seem to figure out how to store data using the Database blocks?
Could anyone give me an explanation of how these work in a nutshell of some sorts?
You store values with this block
![]()
Then you can get that same value back using this block
![]()
This block will delete the key from the browser, so you won't be able to get the value again.
![]()
![]()
What does the key part of it mean? is it like a password or serial number you use to call it back?
The key is basically just a variable name. And yeah, it's kind of like a serial number.
Thank you!
Bear in mind that browser storage is limited in size and liable to being erased by the user when their browser slows down too much. And you have to be on the same computer to read it back. If you want to save something important, you'd be better off using your computer's filesystem or some online storage provider such as Dropbox or Google Drive.
Im just playing around with a inventory system, thank you though
The database blocks are really only useful for storing data in the browser that can then be grabbed back if the user goes to your project again. It's basically like a save file.
If you want to create an inventory system, you're probably better off just using a list of lists as key/value pairs
You can even set the values in a list similar to how the database blocks work
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.