Store the letters in a table, and use table.Random?
Edit: Late :(
[lua]
function RandomLetter()
return string.char(math.random(97, 122));
end
[/lua]
[lua]
function string.random(length)
local str = "";
for i = 1, length do
str = str..string.char(math.random(32, 126));
end
return str;
end
[/lua]
Very old function I found in my old dev folder, returns alpha numeric string, lower and uppercase also special chars.
Sorry, you need to Log In to post a reply to this thread.