This can't be:

1) In Client-Server mode, enet_get_clientid() normally should return 0.
2) enet_set_playername() returns a warning if clientid is negative! (Did you turned of the warnings with anet_set_warning()?)

=> Either you display a wrong value or enet_set_playername() is called before the clientid is set to -1.

Do you use a password protected server? Because there is a bug in the current version that always disconnects the client even if a correct password is sent.
(Fixed in 1.2.1.1 that will be released soon with more new features wink ).

Can you post your code?


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version