• Error when loading this code
    7 replies, posted
if (SERVER) then util.AddNetworkstring("somenetwork") hook.Add("PlayerSay", "OpenDerma", function( ply, text, public) text = string.lower( text ) if ( text == "!thomasdermapanel" ) then net.Start("somenetwork") net.Send(ply) end end) end if (CLIENT) then net.Recieve("somenetwork", function() local Frame = vgui.Create( "DFrame" ) Frame:SetPos( 5, 5 ) Frame:SetSize( 300, 150 ) Frame:SetTitle( "Name window" ) Frame:SetVisible( true ) Frame:SetDraggable( false ) Frame:ShowCloseButton( true ) Frame:MakePopup() local DLabel = vgui.Create( "DLabel", Frame ) DLabel:SetPos( 40, 40 ) DLabel:SetText( Player:Nick() ) end) end Im getting this error: [ERROR] LuaCmd:1: '=' expected near '<eof>' 1. unknown - LuaCmd:0
Use [code] tags, and that error isn't related to your code. Where did you put the code?
Well i fixed 1 part it doenst say that anymore becouse now i used lua_openscript bu now it says when i load in server side [ERROR] lua/autorun/run.lua:3: attempt to call field 'AddNetworkstring' (a nil value) 1. unknown - lua/autorun/run.lua:3 and in client side: [ERROR] lua/autorun/run.lua:16: attempt to call field 'Recieve' (a nil value) 1. unknown - lua/autorun/run.lua:16
It's AddNetwork[B]S[/B]tring and Rec[B]ei[/B]ve
got this error after typing the command: [ERROR] lua/autorun/run.lua:29: attempt to index global 'Player' (a function value) 1. func - lua/autorun/run.lua:29 2. unknown - lua/includes/extensions/net.lua:32
Player isn't defined in your code. Did you mean LocalPlayer()?
It says my name with ...: thomas al...
Where it says DLabel:SetText( Player:Nick() ) Replace it with: DLabel:SetText( [B]ply[/B]:Nick() )
Sorry, you need to Log In to post a reply to this thread.