It's not bugged, you guys are just coming up with really bad game design and giving people insane levels which it wasn't designed to have.
You need to change it to uint64_t in the else block not just check if the double (experience in this case) is bigger than 18446744073709551615
C++:
msg.add<uint64_t>(static_cast<uint64_t>(player->getExperience()));