So I'm switching IPs and I'm putting this in lua > autorun > serverjoin.lua
if SERVER then
AddCSLuaFile()
else
hook.Add( "Initialize", "server_connect_popup", function()
timer.Simple( 3, function() --put code here
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 250 )
DermaPanel:SetTitle( "Testing Derma Stuff" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
local DermaButton = vgui.Create( "DButton" )
DermaButton:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
DermaButton:SetText( "Connect to our new server" )
DermaButton:SetPos( 25, 50 )
DermaButton:SetSize( 150, 50 )
DermaButton.DoClick = function ()
RunConsoleCommand("connect","192.223.27.27:27015")
end
end )
end )
end
And it returns this error Bad server address ("192.223.27.27:27015")
Note I can connect to the server normally and the server is turned on and this is the correct IP.
I've also tried a bunch of other solutions like this
RunConsoleCommand("connect","'2192.223.27.27:27015'")
RunConsoleCommand("connect","\"192.223.27.27:27015\"")
RunConsoleCommand("connect", "192.223.27.27", ":27015")
RunConsoleCommand("connect", "192.223.27.27", "27015")
And none of them work.
Anybody mind helping a fellow out?
[editline]8th November 2013[/editline]
Note that the meta box appears upon joining and when i click on it its starts to connect but fails and returns an error in console each time close to Bad server address ("192.223.27.27:27015")