#UpdateAsync params

1 messages · Page 1 of 1 (latest)

solid scarab
#

im trying to use UpdateAsync to make a datastore. I get the first arguement, its the key, THAT i understand, but the second parameter is confusing me. Do i need a function to use it???

#

if it helps:

grave gulch
#

the second parameter is just a function. And whatever the function returns will be the new value for the DataStore

#

its just like SetAsync but the functions value is the new value

solid scarab
grave gulch
solid scarab
grave gulch
#
DataStore:UpdateAsync(Key, function()

end)
solid scarab
#

thats what i DID

grave gulch
#

and?

solid scarab
#

whole function stops after the return

#

(by function i mean savedata())

grave gulch
#

maybe make a new function called GetData which returns the new data

#

and give it to the 2nd parameter

summer pelican
grave gulch
summer pelican
#

specially for something as obvious and simple to research as this

grave gulch
#

fair enough

solid scarab
solid scarab
#

pyro pleeeeeaasseeeecrying

#

@summer pelican i beg yousob2k

summer pelican
#

all sorts of goodies in the plant project so that's a fun one all round

grave gulch
#

all hail the great pyro

solid scarab
#

ooh

#

looks good