HTML Derma Panel: How to request URL from Config file.

Okay, so basically I have a pretty basic derma panel. And I’m trying to figure out how to write this out so instead of " html:OpenURL ( “https://www.google.com” )
it’ll grab the url from a config file. Any ideas?

[lua]
local html = vgui.Create( “HTML” )
html:SetPos( 50, 50 )
html:SetSize( ScrW() - 100, ScrH() - 100 )
html:MakePopup()
html:Center()
html:OpenURL ( “https://www.google.com” )
html:SetVisible(false)
[/lua]

To anyone who’s reading this, thank you for your time and consideration. Any input is GREATLY appreciated! Have a wonderful day :slight_smile:


(User was banned for this post ("Wrong section" - Novangel))

I beg your pardon if wrong, but have you tried include(config file.lua) at the start?

Lets say in your config file it says "Config.URL = “wiki.garrysmod.com”, wouldn’t you just have to do



include("sv_configfile.lua")
local site = Config.URL
local html = vgui.Create( "HTML" )
        html:SetPos( 50, 50 )
        html:SetSize( ScrW() - 100, ScrH() - 100 )
        html:MakePopup()
        html:Center() 
        html:OpenURL ( site )
        html:SetVisible(false)


Again, i’m sorry if this doesn’t work, I’m a begginer in Lua :s