The code you have provided has very little information.
What is NETVAR() ?
Show the NETVAR() function prototype or function definition.
Code:
NETVAR(Spotted, "CBaseEntity->m_bSpotted", bool);
Are you sure the data type of the arguments you passed are correct ?
Is
Code:
"CBaseEntity->m_bSpotted"
supposed to be a string ?