Skip to content

Commit 1c16693

Browse files
committed
Corrected documentation mistakes in DICE.LUA
1 parent 5d9da02 commit 1c16693

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xtra/DICE.LUA

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
-- sides = The amount of sides a dice has
44
-- dice = The amount of dice to roll
5-
-- roll = The amount of times to roll the dice
5+
-- roll = Table to store the roll information
66
sides, dice, roll = tonumber(arg[2]) or 6, tonumber(arg[1]) or 1, {}
7-
for _ = 1, dice do
7+
8+
for _ = 1, dice do -- Roll all the dice
89
table.insert(roll, math.floor(math.random(1, sides)))
910
end
11+
1012
print("Dice rolled: " .. table.concat(roll, ", "))

0 commit comments

Comments
 (0)