Jump to content
MakeWebGames

Recommended Posts

Posted

Right, I was on my MCCodes V2 game, that me and a friend created recently, and I noticed that a person had signed up with an ID of 6? I tried moving his ID to 3 but that messed it up even more, so I had to delete his account. Is there anyway I can "optimize" player's IDs?

Posted

Why do you feel like you need to "optimize" their ID's ? What possible gain is there ? The ID's are simple there for the application to be able to track players by something that is utterly unique to them, changing it would mean changing that ID in many tables essentially simultaneously as any interaction part way through could really screw things up.

If you delete players, and end up with "holes" in your ID list (1,2,3,6,8,9,10...) there are easy ways to find out the lowest "hole" and use that when registering somebody, but the chances are quite high that some other tables will still have data relating to that ID number (inventory, mail, attack logs etc) that may affect their account.

I would ask the question why do you need to show ID's ? Sure, you need something unique to each player to refer to them from urls but outside of that there's no real need to ever display that information.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...