• Why doesn't my gamemode folder exist on the client?
    6 replies, posted
[code]] lua_run a,b = file.Find("applejack*", "LUA") print(b[1], file.Exists("applejack", "LUA")) > a,b = file.Find("applejack*", "LUA") print(b[1], file.Exists("applejack", "LUA"))... applejack true [/code] [code]] lua_run_cl a,b = file.Find("applejack*", "LUA") print(b[1], file.Exists("applejack", "LUA")) applejack false [/code]
If you are looking for a folder use [url]http://wiki.garrysmod.com/page/file/IsDir[/url] not file.Exists oh I see your problem now, that's weird. I couldn't tell by your post.
[i]Files[/i] in it exist. [code] ] lua_run_cl a,b = file.Find("applejack/*", "LUA") PrintTable(a)PrintTable(b) print(file.Exists("applejack/gamemode", "LUA"), file.IsDir("applejack/gamemode", "LUA"), file.Exists("applejack/gamemode/cl_init.lua", "LUA")) 1 = entities 2 = gamemode false false true [/code] [editline]22nd April 2014[/editline] [QUOTE=Pandaman09;44617163]If you are looking for a folder use [url]http://wiki.garrysmod.com/page/file/IsDir[/url] not file.Exists[/QUOTE] Also returns false, see above. [editline]22nd April 2014[/editline] [QUOTE=Pandaman09;44617163]If you are looking for a folder use [url]http://wiki.garrysmod.com/page/file/IsDir[/url] not file.Exists[/QUOTE] Also, file.Exists does work on directories. [code] ] lua_run_cl print(file.Exists("gamemodes/", "MOD")) true [/code]
Typically it won't exist on the client as far as I'm aware unless they've downloaded it like ttt, etc.
It definitely [i]exists[/i], because I'm running lua from it and searching in it with file.Find. This looks like a bug to me, so I've [url=Facepunch/garrysmod-issues/issues/1038]filed a report.[/url]
It may be a "virtual" copy based on the cache? Addons, etc are virtually distributed throughout, so that could be the reason too.
I don't see why that would make file.Exists return false on the the folder name.
Sorry, you need to Log In to post a reply to this thread.