Search
 
SCRIPT & CODE EXAMPLE
 

LUA

how to get a random number in lua

local randomNumber1 = math.random(1, 10) --Returns a number between 1 and 10.
local randomNumber2 = math.random(10) --Also returns a number between 1 and 10.

print(randomNumber1, randomNumber2) --OUTPUT EXAMPLE: "6, 8"
Comment

lua random number

local number = math.random(1, 10)
# change 1 to be the smallest possible number
# change 10 to the be the biggest possible number
Comment

PREVIOUS NEXT
Code Example
Lua :: What percentage of developers use Lua 
Lua :: exemple boolean and why it is used 
Lua :: swap number in lua 
Lua :: when do true loop on roblox 
Lua :: lua how to default value if nil 
Lua :: lua run string as code 
Lua :: Simple Roblox Lua Function 
Matlab :: matlab unix time to datetime 
Matlab :: anonymous function matlab 
Matlab :: count even and odd numbers in matlab 
Matlab :: how to get the highest power of polynomial matlab 
Matlab :: odd even in array matlab 
Matlab :: matlab new line in string 
Basic :: virtualbox 256 vram 
Basic :: robocopy sync one way 
Elixir :: how to split string in elixir 
Elixir :: elixir timex format 
Elixir :: phoenix ecto query bindingess 
Scala :: scala string to lower case 
Scala :: how to get absolute value in scala 
Actionscript :: truncate restart identity - syntax error at or near "identity" 
Excel :: excel auto fit row height 
Perl :: perl until loop 
Perl :: perl running mechanize through tor 
Pascal :: Pascal Game 
Gdscript :: godot check left mouse button 
Lisp :: elisp return type 
Assembly :: wstring to lpcwstr 
Assembly :: smt32f429 timer free running 
Javascript :: jquery vslidation remove spaces from input 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =