Module 11 · In Studio · challenge 3 of 3 in this lesson
splitValid accepts only splits whose shares are above 0 and add up to 100 or less
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Start from the m14-ship tag in the game repo, then fix the three money rules in challenges/career_work.luau. The worked example is Roblox's own group payout example.
Press Play and run this in the server command bar:
game.ServerScriptService.RunGameTests:Invoke("career")
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("career")in the server command bar. Copy the pass code from Output.
Done means
- splitValid accepts only splits whose shares are above 0 and add up to 100 or less
- distribute pays the game split first, then the group split from the leftover, and returns the group balance
- devexUsd returns nil below the minimum request and dollars above it
- challenges/career.luau prints TEST PASS for all twelve cases