Commit 8dbe8b67 authored by funshine's avatar funshine
Browse files

add a lua module example myfile.lua

parent 2671c0c1
--myfile.lua
local myfile = {}
function myfile.print(name)
file.open(name)
repeat
local line=file.readline()
if line then line=(string.gsub(line,"\n","")) print(line) end
until not line
file.close()
end
return myfile
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment