Is the "AddCSLuaFile" command failing me?



Couldn't include file 'tgr_admin_buttons.lua' (File not found)
Couldn't include file 'tgr_player_frame.lua' (File not found)


That’s the error that is causing numerous errors on the clients that tries to join my shiny new gamemode.
The files must be working perfectly, since i am able to run them as the host. The problem here seems to be that the clients are not getting the files!

I got both files listed up on the download list in my init.lua file:



AddCSLuaFile( "tgr_vote_button.lua" )
AddCSLuaFile( "tgr_player_frame.lua" )


What could be the problem?

Check spelling and check to make sure these files are not in a sub folder (in that case you would need to show the path too).

Make sure to include it on the clientside.

make sure there arent any errors in them. I found that it would mysteriously know and refuse which files had glaring errors and just not give them out.

This!

Try including them clientside yes, also check if the clientside files needs some files you haven’t sent.

If he wasn’t already including them clientside then why would the clients be getting errors about missing include files?

File not found, the files would be in the MAIN Gamemode file

so something like

/scoreboard/tgr_admin_buttons.lua
or w/e

Post init and cl_init.lua.

Why would you look for root/scoreboard/tgr_admin_buttons.lua?

Example, but i do agree with you!

A few things I noticed. First off:

Those aren’t the same. There may be a slight possibility that caused some of your problems, but not all.

Second of all, those files aren’t in any folders inside the gamemode folder, yes?

Such as:

gamemode/init.lua
gamemode/scoreboard/tgr_vote_button.lua

Things like that. tgr_player_frame.lua and such are not in a separate folder than your init.lua, right?

If so, I don’t know what else to say.