Nexus PANEL :OO :D

Hi, im trying to make a nexus panel that open a Webbrowser to my website, but i got some problems, ingame there is Lua Errors, and you can’t open the menu.

Here is the code: http://pastebin.com/xwU6MYad

The Errors:

vgui.Create: Error when calling ‘nx_openweb’:Init (nexus/gamemode/core/derma/cl_openweb.lua:27: attempt to index field ‘openwebForm’ (a nil value))

vgui.Create: Error when calling ‘nx_Menu’:Init (nexus/gamemode/core/derma/cl_menu.lua:132: attempt to index local ‘panel’ (a nil value))

ERROR: GAMEMODE:‘ScoreboardShow’ Failed: nexus/gamemode/core/libraries/cl_menu.lua:89: attempt to index field ‘panel’ (a nil value)

You are making your panel and then overriding it with another before you register it.

[editline]01:43PM[/editline]

Remove the local PANEL = {} on line 65.

Thx, i already fixed that xD (new code in the pastebin) I got new problems now.

First of all, this isn’t going to work:
[lua] local self = vgui.Create(“DFrame”);
self.openwebForm:SetSize(ScrW() / 1.1,ScrH() / 1.1);
self.openwebForm:Center();
self.openwebForm:SetTitle(“Our Website”);
self.openwebForm:SetBackgroundBlur( true );
self.openwebForm:MakePopup();[/lua]
Your making self do: vgui.Create(“DFrame”); and then later try to modify self.openwebForm which does not exist.

Second of all, you are parenting it to a undefined panel:
[lua]local Butt = vgui.Create(“DButton”,Form)[/lua]
Form isnt declared anywhere.

um okey, confused, could you maybe help me to change the Panel to work?

There is nothing called “Form”. Why’d you write it?

Yea, I already told him that

I think best is to just use this function: [lua]nexus.directory.AddCategoryPage(category, parent, htmlCode, isWebsite)[/lua]
Nexus is a framework, the point is that you only have to make the schemes, modifying as little as possible to the actual framework.

[lua]
nexus.directory.AddCategoryPage( “Website”, nil, “http://x-hosters.com”, true )
[/lua]

Try that. Oh and just make a folder called directory in schema/ and file called cl_website.lua and paste that in.

Okey thx, and i alredy know, but i still want to edit this code:

to a Panel, (for nexus).

Or is it too hard to fix?

Yea, but he replied that he was confused, so I just pointed it out again, and I asked him what made him write “Form”.