lua opening lua

Is it possible to make a lua script open another lua script, when a function is called?

Open another lua script? Do you mean call a function from another script? Or…

[lua]local luapath = “autorun/client/shitfiles/”
local filestofind = file.Find( “…/lua/” … luapath … “*.lua” )

for k, v in ipairs( filestofind ) do
timer.Simple( k*0.2, function() --I added a delay just cause’, isn’t needed
print( "Loaded file " … v )
include( luapath … v ) --load the file???
end )
end[/lua]

Or that :smiley:

:smiley: Thanks alot!