Open suunr opened 9 years ago
Ownership & CPPI stuff for holograms is currently pending #360.
To error 'during' creation should be incredibly rare. Tbh, something I've not really considered before. I know that holograms should clean up when a chip errors/is removed though.
This is still valid, please leave open.
I was looking into this and created this script:
local function quotaCheck ( n )
return ( quotaUsed() < quotaMax() * n ) and ( quotaAverage() < quotaMax() * n )
end
hook.add( "think", "test", function()
local x = 0
while quotaCheck( 0.96 ) do
x = x + 1
end
if quotaCheck( 0.97 ) and not quotaCheck( 0.96 ) then
holograms.create( entities.self():getPos(), Angle(), "models/sprops/cuboids/height06/size_1/cube_6x6x6.mdl", Vector( 1, 1, 1 ) )
end
end )
The chip sometimes quotas and the hologram doesn't get removed if it quotas when creating the hologram but most of the time the chip errors, the hologram doesn't get deleted and I get this in the console:
[ERROR]
scripted_ents.Get failed!
Processor of Jazzelhawk errored: addons/starfall/lua/starfall/libs_sv/holograms.lua:318: attempt to call method 'SetScale' (a nil value)
Can anyone else confirm this? Before I was getting a different error where [ERROR]
was and it was a stacktrace which started from a concommand and ended up getting to SF.Editor.runJS
with a nil parameter. And I can't recreate that error. Confusing...
When the starfall chip exceeds CPU Quota while creating a hologram the hologram will stay forever there and there isn't an owner assigned to it (=you can't remove it).