DFrame prevent multiple tabs opening.

As you see in the title, I’m wondering if there is a way to lock multiple openings of a DFrame window, for eg. I have it so when you open a certain tab, it brings up a custom DFrame Admin Menu, however when you close the tab then bring it back up it re-opens it over the old one leaving 2 Admin Menus on top of eachother, it also doesn’t close if the whole normal menu is closed.

Are you trying to ensure all windows close when you close the main? I’m slightly confused by your description. Are you trying to keep all sub-panels open after the main is closed? More detail, and maybe show us what you have so far.

Okay, so scrap the original idea. My admin menu opens on the default screen, I am trying to use this code to close 2 default DFrames when I enter another:

	if ( IsValid( BaseTeller ) ) then
		BaseTeller:SetVisible( false )
	if ( IsValid( AdminMenu ) ) then
		AdminMenu:SetVisible( true )

but I get the error:

[ERROR] addons/rhodes_bank_teller/lua/entities/bank_teller/cl_init.lua:75: unexpected symbol near ')'
  1. unknown - addons/rhodes_bank_teller/lua/entities/bank_teller/cl_init.lua:0

You’re missing an end.