LINK
https://pastebin.com/HH67n4YQ
p.s this is only a portion of the code
print( "Hello " .. "World!" )
sorry, its the same solution isnt it?
ex = "Hello"
ex1 = "world"
print(ex .. " " .. ex1)
Outputs:
Hello world
print(5 + 5)
Outputs:
10
num = 5
num1 = 6
print(num + num1)
Outputs:
11
n = 1
print("Hello, you are " .. tostring(n) .. " person.")
Outputs:
Hello, you are 1 person.
Or you could just change the original variable to a string:
tostring(n)
If you want to do the opposite, say in a math equation, you'll need to use tonumber().
n = "5"
tonumber(n)
if n == 5 then
print(5)
end
local n = 1
local nString = tostring(n)
Mixing the two will not work. It will throw an error.
print("2" + "2") --> 4
print("2" + 2) --> 4
print(2 .. 2) --> 22
print("2" .. 2) --> 22