• Hey! Register here to create your account, engage with the community, and talk about what is new!

dicts

AxeALotLol

Active member
Overlord
Joined
Sep 6, 2022
Messages
53
Reaction score
8
DF should make a full video on dicts because I'm stupid and reference book doesn't explain it that well.
 

Speeder323

Forum adept
Joined
Sep 17, 2020
Messages
165
Reaction score
31
it's basically two lists linked together
you have a "key" and to that key you assign a "value"
if for example you wanted to store points in a dictionary
the "key" would be the players username (or uuid) and the value would be the points
need to retrieve the points later? you simply use "get value from key" or whatever it's called I don't remember
the slight difficult thing is when you're trying to get a key from a value, in which a tutorial probably would be needed, but it's not that often that you need to do that

hope this helps
 

AxeALotLol

Active member
Overlord
Joined
Sep 6, 2022
Messages
53
Reaction score
8
it's basically two lists linked together
you have a "key" and to that key you assign a "value"
if for example you wanted to store points in a dictionary
the "key" would be the players username (or uuid) and the value would be the points
need to retrieve the points later? you simply use "get value from key" or whatever it's called I don't remember
the slight difficult thing is when you're trying to get a key from a value, in which a tutorial probably would be needed, but it's not that often that you need to do that

hope this helps
thanks and also its called get dict value
 
Top Bottom