Reputation:
I need to run a .lua file with another .lua file. Here is my code:
Program = io.read()
dofile(program)
I type the name of the file that I want to run correctly, but for some reason my compiler says that the file I typed does not exist. (Which it does)
Upvotes: 2
Views: 2268
Reputation: 4311
Lua is case sensitive; Program
is not program
Otherwise the code should work.
Upvotes: 12
Reputation: 13886
Try putting the full path instead of the relative path. i.e. /home/nick/script.lua
Upvotes: 3