• Input not carrying over?
    0 replies, posted
I am fairly new to lua and I am not sure how to deal with the problem below. Any help is appreciated. [lua] --Code in the first net function ipw = vgui.Create("DTextEntry",ip) ipw:SetSize(490,230) ipw:SetMultiline(true) ipw:SetPos(5,30) --function ipw:Paint(w,h) draw.RoundedBox(0,0,0,w,h,Color(0,0,0,200)) end local ipwb = vgui.Create("DButton",ip) ipwb:SetSize(100,30) ipwb:SetPos(0,265) ipwb:CenterHorizontal() ipwb:SetText("") ipwb.DoClick = function() if ipw:GetValue() == "" then LocalPlayer():ChatPrint(am.TextNoInput) else net.Start("preventmulti") net.SendToServer() net.Start("sendalert") net.WriteString( ipw:GetValue() ) net.SendToServer() ip:SetVisible(false) end end function ipwb:Paint(w,h) draw.RoundedBox(0,0,0,w,h,Color(0,0,0,200)) end local ipwbt = vgui.Create("DLabel",ipwb) ipwbt:SetText("Send") ipwbt:SizeToContents() ipwbt:Center() end) --Code in the second using the DTextEntry in the first local aptp = vgui.Create("RichText",ap) aptp:SetSize(ap:GetWide()-10,90) aptp:SetPos(5,30) aptp:AppendText(ipw:GetValue()) --Line that the script error is referring to. --Error I am getting [ERROR] addons/admin-help-menu/lua/autorun/am_menu.lua:121: Tried to use invalid object (type Panel) (Object was NULL or not of the right type) 1. GetValue - [C]:-1 2. func - addons/admin-help-menu/lua/autorun/am_menu.lua:121 3. unknown - lua/includes/extensions/net.lua:32 [/lua] [editline]3rd January 2016[/editline] Friend helped me solve this problem. Solved.
Sorry, you need to Log In to post a reply to this thread.