Derma Problem


I am having a problem with this derma menu i just made.


function npc_doctor( )

  local DFrame1 = vgui.Create('DFrame')
  DFrame1:SetSize(360, 223)
  DFrame1:SetPos(147, 96)
  DFrame1:SetTitle('Doctor Bob')

  local DPanel1 = vgui.Create('DPanel', DFrame1)
  DPanel1:SetSize(337, 92)
  DPanel1:SetPos(158, 128)

  local DPanel2 = vgui.Create('DPanel', DFrame1)
  DPanel2:SetSize(80, 80)
  DPanel2:SetPos(157, 230)

  local SpawnIcon1 = vgui.Create('SpawnIcon', DFrame1)
  SpawnIcon1:SetPos(167, 239)

  local DPanel3 = vgui.Create('DPanel', DFrame1)
  DPanel3:SetSize(252, 79)
  DPanel3:SetPos(244, 232)

  local DButton1 = vgui.Create('DButton', DFrame1)
  DButton1:SetSize(241, 23)
  DButton1:SetPos(248, 237)
  DButton1:SetText('Yes I am')
  DButton1.DoClick = function()

  local DButton2 = vgui.Create('DButton', DFrame1)
  DButton2:SetSize(241, 23)
  DButton2:SetPos(248, 263)
  DButton2:SetText('No im just looking around')
  DButton2.DoClick = function()

  local DLabel1 = vgui.Create('DLabel', DFrame1)
  DLabel1:SetPos(166, 136)
  DLabel1:SetText('Hello Sir. Are you intrested in becoming a doctor?')
  DLabel1:SetTextColor(Color(255, 255, 255, 255))

usermessage.Hook( “npc_doctor”, npc_doctor)

It’s not showing up in-game. I connected it to the npc i made and it works u press ‘E’ on it and the DFrame will pop up but the buttons won’t. So I was wondering if someone could fix it.


DFrame1:MakePopup( should be DFrame1:MakePopup()

Ok but thats not the problem. I think that the pos is screwd up.

also whats the new notify command?

im trying to use this

Notify (ply 4, 4, “my test here.”)

and its not working

I wont know about the derma, but for the notify: **[Gamemode.AddNotify](**

[editline]17th March 2011[/editline]

Also yes, since the derma panel is parented to the DFrame1, it should have a pos like 10,10

Are you getting errors? Is this file being sent to clients? Is the user message being sent?

We need details man!

Change line 10 to