We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91cb740 commit 81e9704Copy full SHA for 81e9704
scripts/database/index.ts
@@ -90,7 +90,7 @@ export class Database<V = any> {
90
public save(): void {
91
const stringified = JSON.stringify(this.cache)
92
const index = Math.ceil(stringified.length / 32000)
93
- world.setDynamicProperty(`${this.name}Index`)
+ world.setDynamicProperty(`${this.name}Index`, index)
94
for (let i = 0; i < index; i++) {
95
world.setDynamicProperty(`${this.name}:${i}`, stringified.slice(i * 32000, (i + 1) * 32000))
96
}
@@ -122,4 +122,4 @@ export class Database<V = any> {
122
system.runInterval(() => {
123
//@ts-ignore
124
Database.save()
125
-}, 1200)
+}, 1200)
0 commit comments