Everything seems to be working fine server-side, but with today’s (March 25) update, major parts of my code involving a HUD no longer work, as well as a system for transmitting/receiving the angles of NWEntity.
Unfortunately this will be next to impossible for me to fix because nothing is generating Lua errors whatsoever.
IN THE FRETTA BASE:
timer.Simple( GAMEMODE.RoundPreStartTime, function() GAMEMODE:RoundStart() end ) SetGlobalInt( "RoundNumber", iNum ) SetGlobalFloat( "RoundStartTime", CurTime() + GAMEMODE.RoundPreStartTime ) GAMEMODE:ClearRoundResult() GAMEMODE:OnPreRoundStart( GetGlobalInt( "RoundNumber" ) ) GAMEMODE:SetInRound( true )
IN THE HUD:
roundnumber = GetGlobalInt( “RoundNumber”)
if roundnumber > 0 then draw.RoundedBox( 0,HH + 444,ScrH() - 58,56,38, Color( teamclr.r,teamclr.g,teamclr.b,teamclr.a - hudalpha )) surface.SetDrawColor( 0,0,0,200 ) surface.DrawOutlinedRect( HH + 444,ScrH() - 58,56,38 ) draw.SimpleTextOutlined( "KILLS", "DermaDefault",HH + 472,ScrH() - 53, Color( 250,50,50,220 ),TEXT_ALIGN_CENTER,0,1,Color( 0,0,0,255 )) draw.SimpleTextOutlined( frags, "DermaScores",HH + 472,ScrH() - 43, Color( 250,50,50,220 ),TEXT_ALIGN_CENTER,0,1,Color( 0,0,0,255 )) end
In this case Kills will no longer show at all on the screen because the GetGlobalInt(“RoundNumber”) is failing to return anything but -1
I put that in there to prevent Lua errors from nil values in pre-round. RoundNumber is -1 during pre-round/connection time, but SHOULD be a positive integer during gameplay.
Any ideas what might be causing this sort of thing to happen?