252 posts
Posted 04 September 2012 - 09:35 PM
How to combine this code into one statement?
write("\nCancellation For ") write(formalname1) write(" Successful!")
I don't really want to have to type write that many times.. And with textutils.slowPrint(), it doesn't work very well at all either. Any help? And can someone explain it as well for textutils.slowPrint()?
Thanks.
436 posts
Posted 04 September 2012 - 09:41 PM
Mmm. You could make the three strings into one via concatenation ( .. ).
outWrite = "/nCancellation For " .. formalname1 .. " Successful!"
write(outWrite)
And I think slowPrint is supposed to work with an array (ie. "/nCancellation For ", formalname, " Successful!"), but I don't know.
65 posts
Location
The Internet
Posted 05 September 2012 - 01:11 AM
How to combine this code into one statement?
write("nCancellation For ") write(formalname1) write(" Successful!")
I don't really want to have to type write that many times.. And with textutils.slowPrint(), it doesn't work very well at all either. Any help? And can someone explain it as well for textutils.slowPrint()?
Thanks.
As well as what Omega said, you could have this:
write("nCancellation For "..formalname1.." Successful!")
The only difference really is it saves you the use of another variable.
252 posts
Posted 05 September 2012 - 03:34 PM
How to combine this code into one statement?
write("nCancellation For ") write(formalname1) write(" Successful!")
I don't really want to have to type write that many times.. And with textutils.slowPrint(), it doesn't work very well at all either. Any help? And can someone explain it as well for textutils.slowPrint()?
Thanks.
As well as what Omega said, you could have this:
write("nCancellation For "..formalname1.." Successful!")
The only difference really is it saves you the use of another variable.
Ok thanks, I have tryed these statements (below) but haven't tryed this one.
write("Stuff", something, "More Stuff)
write(something, "More Stuff")
write("Stuff" + something + "More Stuff")