• Why doesn't this work? [LUA]
    3 replies, posted
Hello, so I'm learning the basics of networking for LUA and so I'm following this tutorial. You can see at the time the video is at, I've copied all of that exactly and I'm getting an error. I just don't understand because he doesn't get the error when he loads his script. clientside: local frame = vgui.Create("DFrame") frame:SetSize(300, 300) frame:SetVisible(true) frame:Center() frame:MakePopup() local b = vgui.Create("DButton", frame) b:DoClick = function() net.Start("MessageName") net.SendToServer() end and serverside: util.AddNetworkString("MessageName") Thanks for the help.
b:DoClick -> b.DoClick You can either do function b:DoClick() [..] end or b.DoClick = function( self ) [..] end.
Please use more descriptive titles from here on out, it helps us help you, and helps others find solutions in the future.
Holy shit. Thank you for this, also sorry for the low bounty that'ss all I had LOL.
Sorry, you need to Log In to post a reply to this thread.