• 3D2D Help
    4 replies, posted
Hello facepunch, So I've been messing with 3D2D and one of my players joined my server and a bug appeared. It was fine before but it seems like whenever you join now there's bad screen tearing now. Any help is appreciated, error below. Error [code][ERROR] lua/includes/modules/draw.lua:146: bad argument #1 to 'gmatch' (string expected, got nil) 1. gmatch - [C]:-1 2. DrawText - lua/includes/modules/draw.lua:146 3. fn - addons/retroplayerinfo/lua/autorun/client/cl_playerinfo.lua:37 4. unknown - addons/ulib-master/lua/ulib/shared/hook.lua:109 [/code] Code [code]cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.20 ) draw.DrawText( ply:GetName(), "retroplayer", 2, 20, Color(236, 186, 15, 255), TEXT_ALIGN_CENTER ) draw.DrawText( ply:getDarkRPVar("job"), "retroplayer", 2, 42, team.GetColor( ply:Team() ), TEXT_ALIGN_CENTER ) -- Line 37 cam.End3D2D() [/code] If you need anything else then let me know! Need to get this fixed ASAP.
that doesn't look like it's line 156, but try [CODE]draw.DrawText( ply:getDarkRPVar("job") or team.GetName( ply:Team()) , "retroplayer", 2, 42, team.GetColor( ply:Team() ), TEXT_ALIGN_CENTER )[/CODE] for the 3rd line
[QUOTE=Bull29;52092733]that doesn't look like it's line 156, but try [CODE]draw.DrawText( ply:getDarkRPVar("job") or team.GetName( ply:Team()) , "retroplayer", 2, 42, team.GetColor( ply:Team() ), TEXT_ALIGN_CENTER )[/CODE] for the 3rd line[/QUOTE] You're right, it's line 37? I'll give that a try though.
my bad; what you're looking for is indeed line 37. 2am brain :s:
[QUOTE=Bull29;52092772]my bad; what you're looking for is indeed line 37. 2am brain :s:[/QUOTE] All good, so I tried it and it seems like it worked. I'm still unsure of how to even reproduce the error since it happened while I was away but I'm gonna keep this open for the night just in-case the problem reoccurs. Thanks though!
Sorry, you need to Log In to post a reply to this thread.