Replacing lines of Lua.

So, I asked before and was told to find out what broke, and the list of fixes here . I’m first trying to fix Gbombs 2 and 3. Console says:

[ERROR] addons/garry’s bombs 3/lua/effects/200mm/init.lua:8: attempt to call method ‘SetMaterialInt’ (a nil value)

  1. unknown - addons/garry’s bombs 3/lua/effects/200mm/init.lua:8

In init.lua there’s


But the only thing looking relavent on the pastebin page says “Added Entity:GetRenderMode”, So I replaced the first line with


First I wanted to know, is the way I replaced it even remotely right? And second, what would I replace the other two lines, $ignorez and $illumfactor with? Is there a way to find out specifically what these turned into? Any pointers are appreciated, thanks.

Try change it to:

Awesome. Thanks for the help, I fixed it kindof. I got the entities working in game, but now they produce an explosion like this:

Of course, the huge black background shouldn’t be there, but should be transparent, showing the sky behind them… Any idea how to fix this?

There is already an updated Gbombs on the workshop.

Unless you’re just doing this to learn Lua. Then have at it.

Awesome, I didn’t know how to use workshop… I think I see most of it now. But even with that, I’m getting the same issue, the black background that shouldn’t be there. Basically when the bombs explode it creates the lens flare on a huge black square. It’s like something is wrong with my video settings, but I can’t tell what’s different. Any ideas?

That is a normal bug. I have it too.