This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Daviddog23's profile picture

How to string together...?

Started by Daviddog23, 04 August 2015 - 09:18 PM
Daviddog23 #1
Posted 04 August 2015 - 11:18 PM
I wrote a program to measure my reactor (Tekkit main) and I'm trying to do this

mon.write(waste + " MB") to string together waste amount, and the text MB, but it gives me an error,

So I did this:

mon.write(waste and " MB"

Which should work, but now it doesn't display the waste value, just the text MB
Lyqyd #2
Posted 05 August 2015 - 12:09 AM
The concatenation operator in Lua is `..`, so:


mon.write(waste.." mB")