local myvariable = print( file.Read( "dir1/file1.txt" ) )
file.Write( "dir2/file2.txt", "myvariable" )
This code will only write "myvariable" to file2.txt but I want the contents from file1.txt to be written to file2.txt. Can I make a "string" be read as a variable? Any other ideas to make this work?
Note: This is for Garry's Mod so its LUA can be referenced here: http://wiki.garrysmod.com/page/Main_Page