Generates an unique identifier.
Note: this page has been written for Advtrains 2.0.1 TSS and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.
advtrains.random_id()
Generates a random 6-digit identifier.
*This function does not take any parameters.*
-- Create a brick platform advtrains.random_id() -- 160218 advtrains.random_id() -- 372546
advtrains/helpers.lua, lines 330 to 336:
function advtrains.random_id() local idst="" for i=0,5 do idst=idst..(math.random(0,9)) end return idst end