to int lua code example
Example 1: lua string to number
local str = '10.7'
local num = tonumber(str)
Example 2: tointeger lua
local a = "5"
local numbera = tonumber(a) --is now an integer
local str = '10.7'
local num = tonumber(str)
local a = "5"
local numbera = tonumber(a) --is now an integer