Module 11 · In Studio · challenge 2 of 2 in this lesson
Build and grade Project 2 in Studio
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Extend Config.luau, DataMigration.luau and DataService.luau in your m14-ship game, then run challenges/capstone_daily_profile.luau in Studio. Solution: challenges/solutions/capstone-yard-extensions.md.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("capstone_daily_profile", "capstone-daily-profile")in the server command bar. Copy the pass code from Output.
Done means
- Config.DAILY_COINS and Config.DAILY_INTERVAL_SECONDS are positive constants in Config.luau
- DataMigration.template().lastDaily is 0, and Reconcile() restores lastDaily = 0 on a mock profile whose lastDaily was removed in memory
- DataService.claimDaily(player, now) pays Config.DAILY_COINS on first claim, updates leaderstats.Coins, returns 0 inside the interval, and pays again once the interval passes
- challenges/capstone_daily_profile.luau prints TEST PASS for all six checks