Quote: "tonumber (e [, base])
When called with no base, tonumber tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then tonumber returns this number; otherwise, it returns nil.
The conversion of strings can result in integers or floats, according to the lexical conventions of Lua (see ยง3.1). (The string may have leading and trailing spaces and a sign.)"
Quote: "When called with base, then e must be a string to be interpreted as an integer numeral in that base. The base may be any integer between 2 and 36, inclusive. In bases above 10, the letter 'A' (in either upper or lower case) represents 10, 'B' represents 11, and so forth, with 'Z' representing 35. If the string e is not a valid numeral in the given base, the function returns nil.
tostring (v)
Receives a value of any type and converts it to a string in a human-readable format. (For complete control of how numbers are converted, use string.format.)
If the metatable of v has a "__tostring" field, then tostring calls the corresponding value with v as argument, and uses the result of the call as its result."
Source:
http://www.lua.org/manual/5.3/manual.html#pdf-tostring
hth
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics