attempt to call method 'DrawEntityOutline' (a nil value)

Hello,

Receiving an error from the addon https://garrysmods.org/download/1471/growing-weed-plant-darkrp which is a free weed plant system.

The only one error I’m getting is every time I buy the entity from the F4 menu (in darkRP), It appears to be invisible with the reflection shadow of it onto the ground.

Until I remove it, client console gets **spammed **with the error:

The code in cl_init.lua file is: https://pastebin.com/xruP4L1c

The specific line num. 7 code is: self:DrawEntityOutline( 0.0 )

I’m assuming that “0.0” is the invalid value, however, I tried changing to different numbers, still, same results. I’m going to try a few more things and I’ll keep you updated on any other errors I get. I would really appreciate if someone could help me fix this error.

[editline]14th August 2017[/editline]

I’ve changed the code to the following:

include(“shared.lua”)

function ENT:Draw()
if self.Entity:GetNWBool(“Usable”) == true then
self.Entity:DrawModel()
self:DrawEntityOutline( 1.0 )
else
self.Entity:DrawModel()
self:DrawEntityOutline( 0.0 )
end
end

This has fixed the invisible error, however, now, I’m receiving an error which says that:

	self:DrawEntityOutline( 0.0 )

is an invalid value.

[editline]14th August 2017[/editline]

Another update.

include(“shared.lua”)

function ENT:Draw()
if self.Entity:GetNWBool(“Usable”) == true then
self.Entity:DrawModel()
else
self.Entity:DrawModel()
end
end

^^^ is what the code looks like now, No errors, etc… However, You do not get any money after collecting the weed from the pot which goes against the aim of the system. Does anyone know a code I can inject so that once you collect the weed, you like 10k? Thanks for any help.

Basically, in other words, players should like 10k each time they collect their weed from the pot once the process of growth has finished.

[editline]14th August 2017[/editline]

A little notice.

The file init.lua is https://pastebin.com/2s2yNyku

I am trying to insert http://wiki.darkrp.com/index.php/DarkRP.Player.AddMoney somewhere within that code, but I don’t have an idea where apart from somewhere inside Stage8.

DrawEntityOutline was removed from GMod 13. I think it was replaced with halos.

Oh, ok. Thanks