Printing a variable between two strings

Started by _Toshy0, Aug 26, 2021, 02:58 am

Previous topic - Next topic

_Toshy0

im very new to programming in lua and cant figure out how to print a variable between two strings i know it is possible in other languages like python | print("[string1] ,[variable],[string2]") | ive tried similar things and searched the internet for solutions but still no success i have posted an immage below of the code im using for this (there is a closing braket it is just offscreen)
You cannot see attachments on this board.

Lupus590

You need to concatenate the strings with the .. operator.

term.write("please enter the"..Message.. "Password: -- whatever else is on that line