why does GM:PlayerConnect not work?

so i putdown the function GM:PlayerConnect and nothing happens when i join the game

function GM:PlayerConnect( name, ip )
	PrintMessage( HUD_PRINTTALK, name .. " has joined the battle." )

Player has joined the game

why does it not change it to battle?

You probably have it somewhere else in your code. Look for it or search for PlayerConnect

PlayerConnect is called as soon as you start to connect, so you wont see the message printed when you finally load in. Use PlayerInitialSpawn instead to print closer to when the player actually joins. It will show up then. You can also just print to server console to check if the function gets called