This is in reference to this thread:
/index.php/topic,5173.0.htmlSince Megiddo isn't online I thought I'd describe my discoveries here before I forget--
So I updated my gmod server/client and joined and immediately saw this error:
ERROR: Hook 'ULXInitPlayer' Failed: [@addons\ulx\lua\ulx\lib.lua:70] bad argument #2 to 'format' (number expected, got nil)
Removing Hook 'ULXInitPlayer'
ERROR: Hook 'ULXWelcome' Failed: [@addons\ulx\lua\ulx\lib.lua:70] bad argument #2 to 'format' (number expected, got nil)
Removing Hook 'ULXWelcome'..Followed by this error when any adverts were supposed to go off:
Timer Error: [@addons\ulx\lua\ulx\lib.lua:70] bad argument #2 to 'format' (number expected, got nil)The bit of code in question was this:
r = tonumber( string.Explode( "\n", file.Read( "../lua/ulx/.svn/entries" ) )[ 4 ] ) -- Get revision from entries file. Hackish I know, but who cares?
version = string.format( "<SVN> revision %i", r )As it turns out, doing a small little test in my server console revealed this:
lua_run print( string.Explode("\n",file.Read("../lua/ulx/.svn/entries"))[4])
> print( string.Explode("\n",file.Read("../lua/ulx/.svn/entries"))[4])...
http://ulyssesmod.net/ulx/trunk/lua/ulx
lua_run print( string.Explode("\n",file.Read("../lua/ulx/.svn/entries"))[3])
> print( string.Explode("\n",file.Read("../lua/ulx/.svn/entries"))[3])...
154
So somehow the line to grab the SVN version number got offset by one? That doesn't make much sense to me considering this was supposedly the fault of a gmod update. I changed the code to this:
r = tonumber( string.Explode( "\n", file.Read( "../lua/ulx/.svn/entries" ) )[ 3 ] ) -- Get revision from entries file. Hackish I know, but who cares?
version = string.format( "<SVN> revision %i", r )--Then I committed to the SVN after testing on my server in hopes that it would solve the OP's problem.
Any thoughts Megiddo? The origin of the problem has me slightly baffled and I hope that my solution doesn't cause more issues because the problem I discovered was the fault of a bad entries file on our dropbox sync. (unlikely?)
I give you full poking permissions for a single day during the summer if I cause any troubles with this
