print the value that is returned by enet_get_globpointer(). Maybe the entity pointer you passed to enet_get_globpointer() was changed by your code and thus the function returns -1.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version