Forum

> > CS2D > Scripts > Dofile all *.Lua files on a directory
Forums overviewCS2D overview Scripts overviewLog in to reply

English Dofile all *.Lua files on a directory

38 replies
Page
To the start Previous 1 2 Next To the start

old Re: Dofile all *.Lua files on a directory

Avo
User Off Offline

Quote
Am I the only one who noticed that some of replies in forum threads and comments in file archive just disappeared? (I don't want to create thread for it, therefore I posted here - some replies disappeared here, too.)
edited 1×, last 02.05.13 09:49:30 am

old Re: Dofile all *.Lua files on a directory

Gajos
BANNED Off Offline

Quote
For Windows >


For Linux >

Admin/mod comment

You should credit the work. /Starkkz

old Re: Dofile all *.Lua files on a directory

KagamineLen
User Off Offline

Quote
@user Avo: your right.

Edit: another thing the code didn't work i just tested it

1
2
3
4
5
6
7
8
modules = ("sys/lua/PBS Script v2.0/Modules")

--// Modules
for k, v in pairs(ReadDir(modules, false, true)) do
     if string.sub(v, -4) == '.lua' then
          dofile(v)
     end 
end
edited 5×, last 03.05.13 01:11:12 pm

old Re: Dofile all *.Lua files on a directory

KagamineLen
User Off Offline

Quote
user Starkkz has written
I didn't have time to test the Linux function, but soon I'll improve it. I have already written stream library for Lua, check my profile.


I'm using windows, i tried the stream on your profile it still not works

user Infinite Rain has written
@user KagamineLen:
Console error(s)?


There are no console errors.
but there are popping cmd's when i start the server
edited 2×, last 03.05.13 11:42:55 pm
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview