• Tried to use invalid object (type Panel) (Object was NULL or not of the right type)
    2 replies, posted
Whenever I try to close the phoneBody DFrame, I get this error: [code] [ERROR] addons/plex/lua/darkrp_modules/cellphone/cl_init.lua:79: Tried to use invalid object (type Panel) (Object was NULL or not of the right type) 1. GetWide - [C]:-1 2. unknown - addons/plex/lua/darkrp_modules/cellphone/cl_init.lua:79 [/code] This is the line it complains about: [code] phoneBody.Paint = function () draw.RoundedBox(10, 0, 0, phoneBody:GetWide(), phoneBody:GetTall(), Color(60,60,60,255)) draw.RoundedBox(6, phoneBody:GetWide() /2 - 50, 20, 100, 15, Color(20,20,20,255)) draw.RoundedBox(4, 22, 50, phoneBody:GetWide() - 40, phoneBody:GetTall() - 90, Color(160,160,160,255)) [/code] I close it by simply: phoneBody:Close()
phoneBody:SetDeleteOnClose(false)
[QUOTE=Chizbang;45318433]Whenever I try to close the phoneBody DFrame, I get this error: [code] [ERROR] addons/plex/lua/darkrp_modules/cellphone/cl_init.lua:79: Tried to use invalid object (type Panel) (Object was NULL or not of the right type) 1. GetWide - [C]:-1 2. unknown - addons/plex/lua/darkrp_modules/cellphone/cl_init.lua:79 [/code] This is the line it complains about: [code] phoneBody.Paint = function () draw.RoundedBox(10, 0, 0, phoneBody:GetWide(), phoneBody:GetTall(), Color(60,60,60,255)) draw.RoundedBox(6, phoneBody:GetWide() /2 - 50, 20, 100, 15, Color(20,20,20,255)) draw.RoundedBox(4, 22, 50, phoneBody:GetWide() - 40, phoneBody:GetTall() - 90, Color(160,160,160,255)) [/code] I close it by simply: phoneBody:Close()[/QUOTE] That doesn't look like 1 line to me.
Sorry, you need to Log In to post a reply to this thread.