i am using CodeBoard V2... i have a small problem with it.
the function in question is:
--- Utility function ..
function ReadIt(file)
local msg = "\n"
if (io.input(file)) then
text = io.input(file)
for line in text:lines() do
msg = msg..line.."\n" end
text:close()
return msg
else
return "Please check the NFO name ["..file.."] does not exist.""
end
end
i believe this statement is trying to see if the file is there
--if (io.input(file)) then
-- --if file exists.....[code]
--else
--return "Please check the NFO name ["..file.."] does...
but when a call is made to a file that is not present the script errors...
NFOPost.lua:178: bad argument #1 to `input' (NFOPosts/4.txt: No such file or directory
can someone please help?
the code you posted worked perfectly. thank you for your prompt response.