DatastoreX - Work faster and better with datastores!

I do understand the default Datastore system but this seems very different to use.

I think he is pointing out that there is no player/playerid parameter supplied in the connect or set function which is what you’d most likely expect for a datastore interface.
I haven’t read the module’s code, but it looks like you’re organizing data like this:

data = {
    ["key1"] = {
        ["player1name"] = val,
        ["player2name"] = val,
    },
    ["key2"] = {
        ["player1name"] = val,
        ["player2name"] = val,
    },
}

instead of like this:

data = {
    ["player1userid"] = {
        ["key1"] = val,
        ["key2"] = val,
    },
    ["player2userid"] = {
        ["key1"] = val,
        ["key2"] = val,
    },
}

This makes more sense organizationally in my opinion and would allow you to call things like
playerData = Datastore.Get(player) or playerDataValue = Datastore.Get(player, "key") instead of manually indexing the list using the player’s name (which should be changed to ID by the way, in case the player changes their name).

I’m not sure what ${rules} are you talking about :smiley:

Oooh, okay! I’m happy to see you like it!

1 Like

My datastore doesn’t save when I set it. Code:
(username is a string)

banDatastore.set({
    [username] = _G.PlayerData[username];
})

Could you make additional functions that work like :SetAsync() and :GetAsync() so that people newer to datastores could just change the value of their datastore variable to the module?

I don’t feel like this is so potential. It isn’t a big thing to rewrite someone’s saving system to this one.

In the example code, it’s not really neat to show the person you want to give these coins/data stores to using their username. If they change it all their stuff is gone.

It’s just an example : P

You can do it with UserIDs too.

Could i make a global leaderboard with datastoreX? And what functions of datastore X would i have to use to make this possible?

can you explain one reason i should use this instead of profile service or is this just a simple data store for people to use with no benifits.

1 Like

I feel like you should read the replies first:

Yeah, this is why you should also read the replies for more information.

I see your point, however, what I quoted is pretty much the most obvious thing you can expect from a DataStore wrapper. I’m not saying that all the information should be transmitted through replies, but don’t expect to find all the information in the original post.

Anyways, I won’t continue this discussion since it’s getting off-topic.

yo chill bro he just said read the replies

2 Likes