Gmod doesn't start up

Whenever i try to play garry’s mod or any sourse game i get an error saying “SteamStartup() failed” and it says it failed with error 1; failed to take master pipe connection lock
what does that mean and how can i fix it