YeetMeister Posted August 30, 2019 Posted August 30, 2019 Is it possible to filter out files with an Extension? Like if I have a .sss The script filters out any other extension and buts the .sss into a gg.choice()
Administrators Enyby Posted August 30, 2019 Administrators Posted August 30, 2019 Check name of choose file. If not match, return back yo choose. Use loop for this,
YeetMeister Posted August 30, 2019 Author Posted August 30, 2019 9 minutes ago, Enyby said: Check name of choose file. If not match, return back yo choose. Use loop for this, Thank you, I will add that later. Can you help me? Idk why this isn't working function select(A) menu = gg.prompt({ "select world file [["..ext.."]]", "select world name" }, {dPath, " "}, {"file", "text"}) if menu[1] then file = io.open(menu[1], "r") source_content = file:read("*a") file = io.open(tPath..menu[2], "w") file:write(file) end end [added 2 minutes later] 4 minutes ago, YeetMeister said: Thank you, I will add that later. Can you help me? Idk why this isn't working local ext = ".wld" function select(A) menu = gg.prompt({ "select world file [["..ext.."]]", "select world name" }, {dPath, " "}, {"file", "text"}) if menu[1] then file = io.open(menu[1], "r") source_content = file:read("*a") file = io.open(tPath..menu[2], "w") file:write(source_content) end end
Administrators Enyby Posted August 30, 2019 Administrators Posted August 30, 2019 Something like this: Examples of Lua scripts (#bwddvayx)
Question
YeetMeister
Is it possible to filter out files with an Extension?
Like if I have a .sss
The script filters out any other extension and buts the .sss into a gg.choice()
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.