DListView permanent lines?

I have it so every time damage gets given to a player, it adds to the list.
I have a custom button so that every time the panel closes, it uses Hide() instead of Close().
I don’t get any script errors, but if let’s just say I use a slow bullet (like a crossbow), I open the menu while it’s in the air, and when it touches it adds to the menu. However, if I close the menu and re-open it, it disappears, that’s why I’m not seeing my pistol bullets. Is there any way I can like make a permanent line so that it doesn’t reset for the whole session?

Sounds like you may be recreating the panel every time you open it. You may be using Hide() instead of Close(), but make sure you’re also using Show() instead of creating it anew.

If you are not recreating it, look into whether the line gets replaced by something rather than added to, or if the scrollpanel itself gets recreated.

I’m now using Hide() and Show(), yet it still resets every time.

EDIT: Oh yeah, and if I use Close() and MakePopup(), I get this error:

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

Under this function:

net.Receive("PlayerDamage", function(  )
	local currentTime = os.time()
	local currentTimeString = os.date("%H:%M:%S", currentTime)
	local atk = net.ReadEntity( attacker )
	local vc = net.ReadEntity( victim )
	local dmg = net.ReadInt(32)

	DamageList:AddLine(currentTimeString, atk:GetName(), vc:GetName(), dmg, atk:GetActiveWeapon():GetClass())
	print("Damaged added to list.")

Another another edit: Here’s a video


[editline]31st July 2016[/editline]

The panel is being deleted when its removed. Thats why its erroring.

Nope, still doing the exact same thing =/

What type of panel are you creating and closing up?

DFrame and DListView

myFrame:SetVisible(false) ???

Tried that, don’t work. I’m busy recreating it from scratch in case I missed something very important.

[editline]1st August 2016[/editline]

Still can’t figure out what the problem is - but EVERY time a new panel opens, it resets, like I’ve had two open at once, and it reset and only one of them worked.

Do not recreate the panel. If a panel already exists ( give it a UNIQUE global variable for checking ), just show the existing one and return end.