• Problems That Don't Need Their Own Thread v5
    4,111 replies, posted
So I am working on my server, no error messages but on the startup when I have 3d2d textscreen installed it will crash. When I remove 3d2d textscreens it starts perfectly.
[QUOTE=blackwidowman;52750030]I hope you're joking? Why would I pose a ragdoll using the weapon[/QUOTE] I never said anything about a weapon. [QUOTE=lefundoof;19111193]You have to pose them. First hang them in the air, by the head.[/QUOTE] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PhysObj/SetPos]PhysObj:SetPos[/url] [QUOTE=lefundoof;19111193]Slowly freeze joints and body one by one.[/QUOTE] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PhysObj/EnableMotion]PhysObj:EnableMotion[/url] [QUOTE=lefundoof;19111193]Then put the legs in a sitting position.[/QUOTE] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PhysObj/SetAngles]PhysObj:SetAngles[/url] [QUOTE=lefundoof;19111193]Weld em to the chair.[/QUOTE] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/constraint/Weld]constraint.Weld[/url] [editline]5th October 2017[/editline] See the example on [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/GetPhysicsObjectCount]Entity:GetPhysicsObjectCount[/url]
[QUOTE=Luni;52748627]seems like they're in srcds/steam_cache/content/4000/<addon-id>/*.bin when downloading, and srcds/garrysmod/cache/*.gma when unpacked[/QUOTE] That's it, thanks !
I want to draw a stencil inside of a stencil. Is this even possible?
So far as I know stencils are an absolute state as opposed to stack based (ie scissor rect), so in order to do stencil-in-stencil you will either need access to the underlying state (which you don't have access to) or you need to be vary careful about which reference values you use and make sure that nothing else uses them.
Does anyone know anything about gmod_anchor? I'm trying to make a scripted entity and I want it to be static, unmovable, and working with an attached [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/constraint/Slider]constraint.Slider[/url]. The gmod_anchor entity has all these properties, so I'm wondering what code it uses. However, my entity needs to be visible, which is why I don't want to use gmod_anchor.
[QUOTE=MPan1;52752160]Does anyone know anything about gmod_anchor? I'm trying to make a scripted entity and I want it to be static, unmovable, and working with an attached [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/constraint/Slider]constraint.Slider[/url]. The gmod_anchor entity has all these properties, so I'm wondering what code it uses. However, my entity needs to be visible, which is why I don't want to use gmod_anchor.[/QUOTE] [url]https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/entities/gmod_anchor.lua[/url]
Is there any function that lets you clip a [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawPoly]surface.DrawPoly[/url] from another [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawPoly]surface.DrawPoly[/url] without using a stencil?
You could look into CSG I guess? But since source doesn't know what that is you could make it yourself with stencils or use bobblehead'CSG library that uses stencils or there was a release a few months back about someone releasing a CSG library that used stencils
[QUOTE=Shenesis;52750539]Gonna need more details. What is "3d2d textscreen"? Is it a freely available add-on? If yes, link it here. It makes little sense for a 3D2D textscreen add-on to crash the server as all the work should be done clientside. Except of course for the spawning and networking[/QUOTE] Here’s the link to the add on, [url]https://steamcommunity.com/sharedfiles/filedetails/?id=109643223&searchtext=3D[/url] its open and just a download add text
How do I launch and play on a srcds without my IP being publicly visible? If that isn't possible, is there a way to prevent workshop addons from automatically downloading (so I can have separate addon folders for development and playing)?
I just overwrote a lua file I've been working on for 2 weeks with a single folder replacement. I'm really starting to sweat. Sublime Text 3 doesn't have an auto backup feature. What??????? Garry's Mod is still open and the code is still actively running in it. Is there anything I can do whatsoever within Garry's Mod to attempt to get some of the code back?
[QUOTE=MPan1;52752573]I just fucking overwrote a lua file I've been working on for 2 weeks with a single folder replacement. I'm really starting to sweat. Garry's Mod is still open and the code is still active in it. Is there anything I can do whatsoever within Garry's Mod to attempt to get some of the code back?[/QUOTE] Not if it is serverside AFAIK. Can't you revert your change, or view the file history?
[QUOTE=Nookyava;52752580]Not if it is serverside AFAIK. Can't you revert your change, or view the file history?[/QUOTE] I thought the folder would merge, not overwrite. The file isn't even there anymore. I don't really care if it's serverside or clientside. Anything at all that might work would be great [editline]6th October 2017[/editline] It's for an entity. Most of the code is clientside.
[QUOTE=MPan1;52752585]I thought the folder would merge, not overwrite. The file isn't even there anymore. I don't really care if it's serverside or clientside. Anything at all that might work would be great [editline]6th October 2017[/editline] It's for an entity. Most of the code is clientside.[/QUOTE] You could check your cache, it MIGHT be there. Every time you join a server a version of the clientside file is sent to you. There's also a way to print the clientside code too if I remember correctly.
[QUOTE=Nookyava;52752607]You could check your cache, it MIGHT be there. Every time you join a server a version of the clientside file is sent to you. There's also a way to print the clientside code too if I remember correctly.[/QUOTE] Okay, there is a bunch of stuff in there, but most of it seems to just be numbers. I'm running 2 crappy data recovery programs at the same time which is probably not a good idea and my laptop is overheating which is not helping with the amount of sweat [editline]6th October 2017[/editline] It seems there's a few cache decrypters out there actually. I'll try some stuff [editline]6th October 2017[/editline] Thanks a lot for the idea, the sweat is decreasing a small bit I think [editline]6th October 2017[/editline] HOLY FUCKING SHIT IT FUCKING WORKED THANK YOU SO FUCKING MUCH HOLY SHIT YOU SAVED ME WEEKS [url]https://github.com/HandsomeMatt/glua-cache-extract[/url] [editline]6th October 2017[/editline] I contacted HandsomeMatt to tell him of how he saved my life, and that goes for you as well, Nookyava. With all my heart and soul, thank you for what you have done today. [editline]6th October 2017[/editline] EVERYONE INSTALL A BACKUP FEATURE IN SUBLIME TEXT RIGHT NOW IF YOU DON'T WANT TO GET ROASTED LIKE ME
[QUOTE=MPan1;52752616]EVERYONE INSTALL A BACKUP FEATURE IN SUBLIME TEXT RIGHT NOW IF YOU DON'T WANT TO GET ROASTED LIKE ME[/QUOTE] I think most people here just use version control
[QUOTE=Banana Lord.;52753168]I think most people here just use version control[/QUOTE] You mean something like "folder" "folder - Copy" "folder - Copy - Copy"? Or is that the wrong way?
[QUOTE=andreblue;52753902]You mean something like "folder" "folder - Copy" "folder - Copy - Copy"? Or is that the wrong way?[/QUOTE] Well shit, i've been doing it wrong the whole time... :v: For real though, why not make a powershell script that is on a schedule to zip a folder and send it to a new destination that isn't in the gmod server folder, and then use like Google Drive (renamed to: Backup and Sync from Google) and just have the destination folder setup as a sync folder? EDIT: After re-reading @MPan1's post i realized the method I described above wouldn't quite work... Instead if you're using windows you could just use the File History feature. (Windows 10: Control Panel\System and Security\File History) you can enable certain folder/files to be setup for file history versions which can be easily restored at any point in time (after you enable it that is...) :cat:
edit: problem solving is a bitch
[QUOTE=Ljgoombruh;52754424]When I used a[i] = nil, values got bumped down[/QUOTE] Are you sure? I thought only table.remove did that. Why does it matter in your case if the values are bumped or not? [editline]7th October 2017[/editline] [QUOTE=Richtofen;52753957]For real though, why not make a powershell script that is on a schedule to zip a folder and send it to a new destination that isn't in the gmod server folder, and then use like Google Drive (renamed to: Backup and Sync from Google) and just have the destination folder setup as a sync folder?[/QUOTE] A. No way to see what lines were actually changed B. Google Drive file size limit
[QUOTE=MPan1;52754431]Are you sure? I thought only table.remove did that. Why does it matter in your case if the values are bumped or not?[/QUOTE] I was using table.insert() without a second arg, and was using a scaling counter for table.remove, so I got confused when things were getting messed up. nil values don't actually get bumped, table.insert just replaces missing values. In my defense, I've been up for > 24 hours.
[QUOTE=MPan1;52754431]Are you sure? I thought only table.remove did that. Why does it matter in your case if the values are bumped or not? [editline]7th October 2017[/editline] A. No way to see what lines were actually changed B. Google Drive file size limit[/QUOTE] Welp, my post was literally me just trying to give you options for how to prevent stuff like that from happening in the future. Sorry that it's not possible for the reasons you listed, hope you come up with something that prevents the problem from happening again. Nice edit btw.
[QUOTE=Richtofen;52754762]Welp, my post was literally me just trying to give you options for how to prevent stuff like that from happening in the future. Sorry that it's not possible for the reasons you listed, hope you come up with something that prevents the problem from happening again. Nice edit btw.[/QUOTE] Sorry, thanks for the idea though
I'm still stuck on an annoying stencil problem. My brain won't let me understand how stencils work. I have two polygons that look like this: [t]https://i.imgur.com/Wx8WAcr.png[/t] I want them to look like this: [t]https://i.imgur.com/keBpCpp.png[/t] At the moment, I can only get them to look like this: [t]https://i.imgur.com/Wvj0cp7.png[/t] This is my code if you want to guess for a while: [CODE] local function DrawCircle( x, y, radius, seg ) local circle = {} table.insert( circle, { x = x, y = y, u = 0.5, v = 0.5 } ) for i = 0, seg do local a = math.rad( ( i / seg ) * -360 ) table.insert( circle, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) * 0.5 + 0.5, v = math.cos( a ) * 0.5 + 0.5 } ) end local a = math.rad( 0 ) table.insert( circle, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) * 0.5 + 0.5, v = math.cos( a ) * 0.5 + 0.5 } ) surface.DrawPoly( circle ) end hook.Add( "HUDPaint", "StencilTest", function() render.ClearStencil() render.SetStencilEnable( true ) render.SetStencilWriteMask( 1 ) render.SetStencilTestMask( 1 ) render.SetStencilReferenceValue( 1 ) render.SetStencilFailOperation( STENCILOPERATION_KEEP ) render.SetStencilZFailOperation( STENCILOPERATION_KEEP ) render.SetStencilPassOperation( STENCILOPERATION_REPLACE ) render.SetStencilCompareFunction( STENCILCOMPARISONFUNCTION_ALWAYS ) surface.SetDrawColor( 255, 255, 255, 255 ) DrawCircle( 100, 100, 30, 10 ) render.SetStencilFailOperation( STENCILOPERATION_REPLACE ) -- I have no clue render.SetStencilZFailOperation( STENCILOPERATION_REPLACE ) -- What I'm doing render.SetStencilPassOperation( STENCILOPERATION_KEEP ) -- This is useless surface.SetDrawColor( 0, 0, 0, 255 ) DrawCircle( 75, 75, 50, 10 ) render.SetStencilEnable( false ) end ) [/CODE]
Attempting to make a custom property for DProperties, used [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Category:DProperty_VectorColor]DProperty_VectorColor[/url] as a base, reason being I basically wanted the same thing but with an alpha slider. Here's what I have so far: [url]https://hastebin.com/fehupejege.lua[/url] Which is returning: [CODE] [ERROR] lua/includes/util/color.lua:16: bad argument #1 to 'min' (number expected, got nil) 1. min - [C]:-1 2. Color - lua/includes/util/color.lua:16 3. unknown - addons/gui/lua/autorun/cl_propcustomcolour.lua:33 [/CODE] Pretty sure it isn't being set on creation for some reason.. Any ideas why?
[QUOTE=Shenesis;52755153]You are doing this at line 33: [lua] surface.SetDrawColor( Color(self.ColorValue) ) [/lua] Which is what happens when you make a Color within a Color: [lua] ] lua_run print(Color(color_white)) > print(Color(color_white))... [ERROR] lua/includes/util/color.lua:16: bad argument #1 to 'min' (number expected, got nil) 1. min - [C]:-1 2. Color - lua/includes/util/color.lua:16 3. unknown - lua_run:1 [/lua] To fix this, try this instead: [lua] surface.SetDrawColor( self.ColorValue ) [/lua][/QUOTE] Forgot to mention I did some testing and that was one thing I tried, incase for some reason one of the setvalues wasn't a color or something [CODE] [ERROR] addons/gui/lua/autorun/cl_propcustomcolour.lua:33: bad argument #3 to 'SetDrawColor' (number expected, got no value) 1. SetDrawColor - [C]:-1 2. unknown - addons/gui/lua/autorun/cl_propcustomcolour.lua:33 [/CODE]
[QUOTE=Shenesis;52755175]Okay so after testing I found that the issue is both the one I mentioned above and this one: At line 46 you're doing [lua]color.ValueChanged = function( newcol )[/lua] Except "newcol" is the color panel and not the color like you'd expect. To fix this, replace that line by: [lua]color.ValueChanged = function( me, newcol )[/lua] Then the code works fine on my end: [IMG]https://vgy.me/8hOn3w.png[/IMG] (you can fix the color name display easily by concatenating or something)[/QUOTE] My bad, Wish this stuff was on the wiki, appreciate it. thank you! :cat:
[QUOTE=DahDestroyer;52755199]My bad, Wish this stuff was on the wiki, appreciate it. thank you! :cat:[/QUOTE] It is -- panel, entity, etc. function are meta functions, meaning their first argument will always be the object. Normally, this is abstracted when you declare functions like: [code]function SomeTable:Func(foo) end[/code] since the first arg becomes "self". Just keep in mind that the above code is just syntactic sugar for: [code]function SomeTable.Func(self, foo) end[/code]
[QUOTE=code_gs;52755212]It is -- panel, entity, etc. function are meta functions, meaning their first argument will always be the object. Normally, this is abstracted when you declare functions like: [code]function SomeTable:Func(foo) end[/code] since the first arg becomes "self". Just keep in mind that the above code is just syntactic sugar for: [code]function SomeTable.Func(self, foo) end[/code][/QUOTE] I was more referring to the ValueChanged function as it differs from DColorCombo OnValueChanged so I had to guess a bit, but appreciate the tips!
Sorry, you need to Log In to post a reply to this thread.