• Searching through gamemode folder
    1 replies, posted
Hello, I know this is a pretty basic question, but I couldn't find an answer. I currently have a folder inside my gamemode's directory, and I want to iterate through it and get the names of all folders within it. The problem is, I can't figure out how to iterate through it - I tried LUA, GAME and MOD and tried leaving only the relative path to the lua file running the code, but with no success. The problematic part of the code is this: [CODE]for k, v in pairs( file.Find("mygamemode/gamemode/iteratethisfolder/*", "LUA") ) do[/CODE] Any suggestions? Thanks
This might do the job? [lua]local fil,fol = file.Find("mygamemode/gamemode/iteratethisfolder/*", "GAME") for k, v in pairs(fol) do[/lua] Fil is the files, Fol is the folders.
Sorry, you need to Log In to post a reply to this thread.