Replacing lines of Lua.

So, I asked before and was told to find out what broke, and the list of fixes here http://pastebin.com/A04ZWEVL . 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

mat:SetMaterialInt("$spriterendermode",9)
mat:SetMaterialInt("$ignorez",1)
mat:SetMaterialInt("$illumfactor",8)

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

mat:SetMaterialInt(“Entity:GetRenderMode”,9)

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.

https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit?pli=1

Try change it to:
[lua]
mat:SetInt("$spriterendermode",9)
mat:SetInt("$ignorez",1)
mat:SetInt("$illumfactor",8)
[/lua]

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. http://steamcommunity.com/sharedfiles/filedetails/?id=107896714

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.