
This page specifies that randomInteger will return between 1 and MAX: <a href="https://wiki.roll20.net/API:Utility_Functions#Random_Numbers" rel="nofollow">https://wiki.roll20.net/API:Utility_Functions#Random_Numbers</a> I was getting some odd results in an API script I was writing and found that randomInteger was returning between 0 and max - 1, not 1 and max. A simple loop to 100 with results. "14, 3, 17, 12, 10, 5, 5, 10, 6, 11, 4, 14, 6, 18, 0, 11, 11, 17, 16, 3" "6, 9, 10, 19, 15, 11, 6, 19, 17, 5, 19, 0, 2, 17, 13, 16, 13, 9, 2, 5" "17, 1, 3, 1, 3, 9, 9, 12, 12, 2, 10, 3, 17, 10, 19, 16, 11, 17, 17, 4" "19, 17, 18, 14, 5, 3, 15, 2, 8, 12, 13, 5, 2, 17, 12, 3, 10, 2, 7, 15" "16, 9, 14, 18, 4, 9, 12, 16, 18, 7, 17, 14, 17, 9, 9, 18, 5, 7, 3, 9" Is this the intended functionality and the wiki wrong or a bug? For now I will simply add 1 to my randomInteger results. Code to reporduce results: <a href="https://gist.github.com/anonymous/5851475" rel="nofollow">https://gist.github.com/anonymous/5851475</a>