• [ERROR] '<name>' expected near '!'
    5 replies, posted
Hello, i am making a basic script to give staff member basic staff weapons like the physgun if they dont have it but i have run into an error, the code is bellow. if ( LocalPlayer():!HasWeapon("weapon_physgun") ) then         net.Start("weapon_physgun")             net.WriteString( net.ReadString() )         net.SendToServer()         chat.AddText( Color( 6, 234, 148 ), "[REDUX]", Color( 3, 189, 226 ), " You have been given a physgun.") end
if (!LocalPlayer():HasWeapon("weapon_physgun")) then net.Start("weapon_physgun") net.WriteString(net.ReadString() net.SendToServer() chat.AddText(Color( 6, 234, 148 ), "[REDUX]", Color( 3, 189, 226 ), " You have been given a physgun.") end Try that.
net.WriteString(net.ReadString() Not related to the error, but what the heck are you even doing with this? There is probably a better way to do what you are trying to do
Make the ! At the start of LocalPlayer rather then after it.
Yep! that one worked thank you.
Depends on what are you trying to do in the first place, the rest of the code would be helpful to understand
Sorry, you need to Log In to post a reply to this thread.