Hey developers,
Do you know more scripting about printing then me?
print("Hello World!")
print("Hello".."World!")
print("Hello","World!")
Hey developers,
Do you know more scripting about printing then me?
print("Hello World!")
print("Hello".."World!")
print("Hello","World!")
Your question is extremely confusing, but I can tell you this wouldnât work;
print("Hello",,"World!")
instead try;
print("Hello","World!")
There are several methods on printing if thatâs what you mean. You can easily do the following to print;
print("Hello"..obj1..obj2) -- ect
print(obj1,obj2) -- ect
print("Hello")
I donât think thereâs more secrets to printing, this is the extreme basics of programming.
Oh, i was wrong. I put the , wrong. I wanted to put , 1 not 2 but it put 2, Sorry.
What do you mean by âscript about printingâ, print is just a built-in function, which littearly prints something in the output.
Here is more info if you want
print("Hello!", "World", 5, true) --you put multiple arguments into it, which is why it's called a variadic function
print("Hello!".."World") --this is called concatenating, meaning connecting multiple strings together
print("Hello!".." ".."World") --you can concatenate many things
--the ",," you used isn't valid syntax in lua, the "..." is a valid thing though, it's not related to strings though
What is your question exactly? Donât make scripting support topics for no reason and just beacuse you can, thank you
Printing is mainly for debugging scripts, and making sure they work. I still do not understand where youâre coming from for your question, printing doesnât have different functions.
Example:
print(50*100^3/4.." is some random math")
However, you canât print tables alone, as it will print the table itself , not the objects in it. So if you where going to attempt that, youâd need a for index and value statement.
Thatâs called a code block,
--stuff in here
Anyways have a good one, hope all your questions where answered.
Use the three ```symbol:
--This is a code block
print("Test")
Then the three dots are for concacting two strings (donât know how to it was write, bad englisch sorry), you should read the wiki
That only works with two dots, and itâs concatenation. (The verb is spelled concatenate.) Three dots is for a function with a variable number of arguments, and is unrelated.
Sorry, i have want to write two, but write three. Three dots are for variadic functions, you have right.
Alright Solved! Love ya everyone!
print("Thanks for the help!","Have a nice day!")
print("GoodNight topic.")