data.profile_schema
function#Declares the Profile every player gets. Declare it once; missing fields take their defaults, and players who joined before start loading then.
data.profile_schema(schema.struct({ coins = schema.number() }))Use it forsetting up, once, what every player saves, like their tokens, level and items.
schemaWhat every Profile holds.optionsoptionalIts version, and how to bring older Profiles up to it.Build a profile_schema callversion · migrate
versionThe version number of the schema, which is a whole number starting from 1.
migrateA function that brings a value saved with an older version up to this one, which must not yield, so it cannot wait or pause.