Blockland Forums > Modification Help
Execution help
(1/2) > >>
Jasa 12265:
Can somebody give me a way to quickly execute an entire folder? Like say exec("./Bricks/");.
MegaScientifical:
exec("Add-Ons/AddOnCat_AddOnName/server.cs");
Like that. Or if you don't want to put a bunch of execs in one file, try this:


--- Code: ---function execFolder(%filepath) {
for(%file = findfirstfile(%filepath @ "/*.cs"); %file !$= ""; %file = findnextfile(%filepath @ "/*.cs"))
exec(%file);
}
--- End code ---

And use execFolder("Bricks");
Jasa 12265:
does execFolder("./Bricks/"); work?
MegaScientifical:
1: You won't need the end / mark.
2: Just do the full thing.
phflack:
you could execute a file which then executes the other ones
Navigation
Message Index
Next page

Go to full version