Unusual problem with a file not loading even though it used to

This will be quite hard to explain so I hope someone can follow it and I hope someone knows an answer.

This has happened to 3 different files/folders. I make a change in one of my files (usually a SWEP or a SENT) and restart the server and the SWEP/SENT doesnt load. There are no errors thrown, it just doesnt load. Then when I delete what I just added and restart the server it still doesnt load. It doesnt matter what I do to that file, it still wont load. The only thing I can do is copy and paste everything from that file into another one with a different name. Once I do that, it works. So it has nothing to do with the contents of the file, it is the file itself that isn’t loading for some reason.
For instance, I have 2 SWEPs, A and B. Both initially work. I make changes in B that for some reason mess it up. I remove those changes and SWEP B still doesnt load. I copy and paste all the code from SWEP B into SWEP A and it loads just fine. I copy it back into SWEP B and it still doesnt load.
Any ideas?


(User was banned for this post ("Wrong section" - mahalis))

Are you using fastdl? If so, make sure to update the cache if you make changes to client side files.

I do not know what fastdl is, so I assume I’m not using it. I am only changing shared files.
I also found that an error IS thrown the first time the file doesnt load. Something along the lines of the file not being found.

Copy the exact error please. If it’s not being found, it usually means that you are trying to include a file that doesn’t exist, or you did not AddCSLuaFile it (send it to all clients).

Well I feel like a ban for that was quite extreme especially given the lack of posted rules in that section as well as many other threads in that section similar to mine.

I accidentally cleared out the error log but I had another error pop up that I believe was the same.
“There was a problem opening the gamemode file ‘blah.lua’”
I ended up fixing it by clearing out the server cache, my cache, and restarting the server. I dont think I need all 3, but just a restart did not fix it.

It seems to happen when I save a file im working on to the server and restart the server mid transfer. I dont know why it doesnt just fix it self once I restart it again with the file fully transferred.

Okay then.