Module 12 · In Studio · challenge 3 of 3 in this lesson
challenges/work/profile_reader.luau builds the v2 Get Data Store Entry URL
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Fix the pure half of the admin tool. Start from the m14-ship tag in the game repo, then run it with game.ServerScriptService.RunGameTests:Invoke("open-cloud-automation").
The grader reads the same envelope as the Lune tool above: value.Data holds coins and speedOwned, and value.MetaData.ActiveSession is a table while a server holds the profile. ProfileStore's lock is the session itself, so there is no clock to compare, and summarize takes only the entry. The old flat BeaconYard_v1 record with sessionJob and sessionAt reads as blank here.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("open-cloud-automation")in the server command bar. Copy the pass code from Output.
Done means
- challenges/work/profile_reader.luau builds the v2 Get Data Store Entry URL
- entryUrl returns the v2 path for BeaconYard_v2 and Player_42 (cloud_url)
- summarize(entry) takes no time argument. It reads coins and speedOwned from value.Data, and a profile is locked when value.MetaData.ActiveSession is a table (cloud_live_lock), not locked once it is gone (cloud_released)
- A flat BeaconYard_v1 record at the top of value is not a profile and reads as blank (cloud_envelope_only)
- Wrong types, an ActiveSession that is not a table, or a missing value read as a blank profile instead of throwing (cloud_bad_value, cloud_no_value)
- The open-cloud-automation challenge prints TEST PASS for all six checks: cloud_url, cloud_live_lock, cloud_released, cloud_envelope_only, cloud_bad_value and cloud_no_value