DarkRP Money Printer Problem

Yet again another Facepunch help post. I’m having this problem as to where when I get the money printers installed and there fine and everything they work when I buy them. But when I press E on them when it has money in it. It doesn’t work. There is one console error every time I press e on it. I copied the error from the server to help. I will also put my addentities.lua down there. Help is greatly and strongly appreciated. Thanks for at least reading :).

Server Error:

Addentities.lua:

P.S I also have the same problem with the Gemstone Money Printers. And also get the same error when I press E on the Gemstone money printers

msg me on steam i might be able to help about the money printers my steam name is mdahitman i have a rockstar logo as a profile pic

It’s addMoney not AddMoney

www.darkrp.com :wink:
Other than that, you shouldn’t start modifying the old DarkRP now, as DarkRP 2.5.0 will come out 4th October. Check http://forum.darkrp.com/threads/darkrp-2-5-0-will-be-released-4th-october.29/

Where can I change that

Go here lua/entities/nuclear_money_printer/init.lua:74 and change AddMoney to addMoney… if you can’t fix that simple error why the hell do run a gamemode as simple as darkrp and you still can’t manage it.

I did that. then after I did that theres another error with the notify thing. Here it is.

[editline]5th September 2013[/editline]

And also heres the whole init file:

AddCSLuaFile(“cl_init.lua”)
AddCSLuaFile(“shared.lua”)
include(“shared.lua”)

local PrintMore
function ENT:Initialize()
self:SetModel(“models/props_lab/reciever01a.mdl”)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetColor(Color(math.random(1, 255), math.random(1, 255), math.random(1,255), 255))
local phys = self:GetPhysicsObject()
if phys:IsValid() then phys:Wake() end
self.sparking = false
self.damage = 100
self.IsMoneyPrinter = true
timer.Simple(1.0, function() PrintMore(self) end)
self:SetNWInt(“PrintA”,0)
end
function ENT:OnTakeDamage(dmg)
if self.burningup then return end

self.damage = (self.damage or 100) - dmg:GetDamage()
if self.damage <= 0 then
	local rnd = math.random(1, 10)
	if rnd < 6 then
		self:BurstIntoFlames()
	else
		self:Destruct()
		self:Remove()
	end
end

end

function ENT:Destruct()
local vPoint = self:GetPos()
local effectdata = EffectData()
effectdata:SetStart(vPoint)
effectdata:SetOrigin(vPoint)
effectdata:SetScale(1)
util.Effect(“Explosion”, effectdata)
GAMEMODE:Notify(self.dt.owning_ent, 1, 4, “Your money printer has exploded!”)
end

function ENT:BurstIntoFlames()
GAMEMODE:Notify(self.dt.owning_ent, 1, 4, “Your money printer is overheating!”)
self.burningup = true
local burntime = math.random(8, 18)
self:Ignite(burntime, 0)
timer.Simple(burntime, function() self:Fireball() end)
end

function ENT:Fireball()
if not self:IsOnFire() then return end
local dist = math.random(20, 280) – Explosion radius
self:Destruct()
for k, v in pairs(ents.FindInSphere(self:GetPos(), dist)) do
if not v:IsPlayer() and not v.IsMoneyPrinter then v:Ignite(math.random(5, 22), 0) end
end
self:Remove()
end

PrintMore = function(ent)
if IsValid(ent) then
ent.sparking = true
timer.Simple(1.0, function() ent:CreateMoneybag() end)
end
end

function ENT:Use(activator)

if(activator:IsPlayer()) and self:GetNWInt(“PrintA”) >= 1 then
activator:addMoney(self:GetNWInt(“PrintA”));
GAMEMODE:Notify(activator, 1, 4, “You have collected $”…self:GetNWInt(“PrintA”)…" from a NuClEaR Printer.")
self:SetNWInt(“PrintA”,0)
end

end

function ENT:CreateMoneybag()
if not IsValid(self) then return end
if self:IsOnFire() then return end
local MoneyPos = self:GetPos()
local X = 22
local Y = math.random(16, 32)
local amount = self:GetNWInt(“PrintA”) + Y
self:SetNWInt(“PrintA”,amount)

self.sparking = false
timer.Simple(1.0, function() PrintMore(self) end)

end

Just download the SVN: https://github.com/dkoz/gsprinters
open the map and go to branches
use the beta map for the printers
this work!