• Print

Author Topic: Derma OpenUrl not liking umsg variables  (Read 4206 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
Derma OpenUrl not liking umsg variables
« on: June 10, 2015, 12:57:58 am »
Sup, using derma menu for html and I have umsg set up correctly, this is my code for the derma panel
Code: Lua
  1. if CLIENT then
  2.        
  3. function DermaHTML(data)
  4.        
  5.         local url = "\"" .. data:ReadString(1) .. data:ReadString(2) .. "\""
  6.         print( url )
  7.  
  8.         local HTMLDerma = vgui.Create( "DFrame" )
  9.         HTMLDerma:SetSize( ScrW() * 0.9, ScrH() * 0.9 )
  10.         HTMLDerma:Center()
  11.         HTMLDerma:SetTitle( "Tom's HTML Menu" )
  12.         HTMLDerma:SetSizable( false )
  13.         HTMLDerma:SetDraggable( true )
  14.         HTMLDerma:ShowCloseButton( true )
  15.         HTMLDerma:MakePopup()
  16.                
  17.         local HTMLTest = vgui.Create("HTML", HTMLDerma )
  18.                 HTMLTest:StretchToParent(5, 25, 5, 5)
  19.                 HTMLTest:OpenURL(url)
  20.         end
  21.         concommand.Add( "+html", DermaHTML )
  22. end
  23.  
  24. usermessage.Hook( "sendthestuff", DermaHTML )
  25.  

As you can see, it is set to open the url sent from umsg...

Code: Lua
  1. umsg.Start("sendthestuff" )
  2.                         umsg.String(link)
  3.                         umsg.String(search)
  4.                 umsg.End()

However, the stuff that gets sent from the umsg dosen't want to open in the derma menu, and it is working correcting because line 6 prints it into the console correctly, also if I do local url = "http://www.google.com/" it opens correctly.

It just dosen't like the variable being from umsg. Any fixes for this, or is it unknown? perhaps I have done something wrong.
« Last Edit: June 10, 2015, 01:12:55 am by Tomzen »
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
Re: Derma OpenUrl not liking umsg variables
« Reply #1 on: June 10, 2015, 01:12:16 am »
I'm an idiot, never mind.
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

  • Print