I experienced this issue on server I'm currently maintaining.
After a 40+ minutes of fixing a problem I saw that we had an old version of file.lua. The structure of wire_expression2_file_download net message was different, and because of that net.ReadString() returned garbage on client and there was no stream message.
So, I decided to add a notify message about an old version, just to safe devs' time, who decided to update to the latest versions of Wiremod, but have old files and also to be safe from random net messages.
Error
[Wiremod] lua/entities/gmod_wire_expression2/core/cl_files.lua:70: attempt to index a nil value
1. func - lua/entities/gmod_wire_expression2/core/cl_files.lua:70
2. unknown - lua/includes/extensions/net.lua:38
What returned net.ReadStream
nil
Expression2 test code
print(fileWrite("a.txt", "123"))
Also provide info for people who don't understand Lua:
I experienced this issue on server I'm currently maintaining. After a 40+ minutes of fixing a problem I saw that we had an old version of
file.lua
. The structure ofwire_expression2_file_download
net message was different, and because of thatnet.ReadString()
returned garbage on client and there was no stream message.So, I decided to add a notify message about an old version, just to safe devs' time, who decided to update to the latest versions of Wiremod, but have old files and also to be safe from random net messages.
Error
What returned
net.ReadStream
nil
Expression2 test code
Also provide info for people who don't understand Lua: