Skip to content

Commit

Permalink
Fixed the compile
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Nov 26, 2023
1 parent f60b0b0 commit 575b7c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This only works on Linux because on Windows creating a ILuaInterface on another
- [x] Better Error handling(It loved to crash on any Lua error.)

## ToDo/Testing
- [ ] Created ILuaInterface should load all Gmod scripts/allow one to do so
- [x] Created ILuaInterface should load all Gmod scripts/allow one to do so
- [ ] Change ILuaAction to use Enums instead of strings.
- [ ] Documentation
- [ ] Recreate all Gmod libraries
Expand Down
8 changes: 2 additions & 6 deletions source/lua_ILuaInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,23 +273,19 @@ void Autorun(ILuaThread* LUA)

pFilename = gpFileSystem->FindNext(findHandle);
}
gpFileSystem->FindClose(findHandle);

FileFindHandle_t findHandle;
const char *pFilename = gpFileSystem->FindFirstEx("lua/autorun/server/*.lua", "GAME", &findHandle);
pFilename = gpFileSystem->FindFirstEx("lua/autorun/server/*.lua", "GAME", &findHandle);
while (pFilename)
{
RunFile(LUA, (((std::string)"lua/autorun/server/") + pFilename).c_str()); // Kill me later.

pFilename = gpFileSystem->FindNext(findHandle);
}
gpFileSystem->FindClose(findHandle);

/*
Load sensorbones. Yes. Gmod also loads them.
*/
FileFindHandle_t findHandle;
const char *pFilename = gpFileSystem->FindFirstEx("lua/autorun/server/sensorbones/*.lua", "GAME", &findHandle);
pFilename = gpFileSystem->FindFirstEx("lua/autorun/server/sensorbones/*.lua", "GAME", &findHandle);
while (pFilename)
{
RunFile(LUA, (((std::string)"lua/autorun/server/sensorbones/") + pFilename).c_str()); // Kill me later.
Expand Down

0 comments on commit 575b7c5

Please sign in to comment.