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

a small coding issue

Started by Wochilly, 19 November 2016 - 07:44 AM
Wochilly #1
Posted 19 November 2016 - 08:44 AM
so, i was making an OS when this line got an error:
shell.run("edit", directory"/"file)
i'm attempting to call edit with the variable directory as the directory and the file variable as the file name
so, how do i do this? or is this even possible?
Edited on 20 November 2016 - 12:20 AM
Bomb Bloke #2
Posted 20 November 2016 - 02:15 AM
If you want to concatenate (join) strings within Lua, use "..".

shell.run("edit", directory .. "/" .. file)