• Welcome to Valhalla Legends Archive.
 

Need some advice

Started by vuther.de, June 06, 2006, 05:45 PM

Previous topic - Next topic

vuther.de

Ok, since the registry is sorted in alphabetical order, I'm having my bot's have the number  "1, 2, 3" in front of the profile name like "1:name". So say I delete profile #2 from 3 profiles, then there will be profiles with the index number of "1, 3" infront of their profile name which will be out of order. So I need to somehow reindex them so that their front number will be "1, 2" and not "1, 3". The problem is, there's not a "rename key" api that does it.

Just thought I'd ask you and see what you have to say.

warz

Instead of appending a "1:", "2:", etc to the front of your USERNAME field, and making it a username / index field, why not place profiles in their own registry folder or whatever, and just make the name of the folder their index. This is what soup bot did. This way, you can count how many registry directories there (and loop through them, finding which #'s exist) as well as sort them, and if you need to re-arange them, it's easier this way also.

When doing things like this, you may think it's better, easier or more efficient to append crap to the beginning of other fields, and use that for sorting purposes, etc. Why make things like that harder on yourself? Don't think so long and hard on this type of stuff. Just do the most logical way.. and what you're doing is not logical.

vuther.de

Your way is basically my way, except I have a username in the field. I would still have the rename each index of the profiles that are in the registry so it will load the right indexes for the RTB, username information, etc. And I do have keys for each profiles. I use EnumKeys()

rabbit

This bot will blow balls on User-level accounts.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

vuther.de

Actually, it works perfect except for when I unload a profile, I just need to fix the index's after I do and it will be ready to go. I've already fixed everything else.

vuther.de

Here's what I'm talking about:

Yegg

What if the user has a colon in their profile name?

warz

Exactly. inner's a NEWB

vuther.de

#8
Why would you have a colon in your name in the first place.

warz, shh. :p

edit: I would make it so when they go to create a profile, if it contained a ":" in it, I would say do not use it.

Networks

Quote from: inner.de on June 07, 2006, 05:22 PM
Why would you have a colon in your name in the first place.

warz, shh. :p

edit: I would make it so when they go to create a profile, if it contained a ":" in it, I would say do not use it.

Why do you need numbers associated with profile names? There isn't a way to enumerate through the directories inside of profiles?

Ringo

Quote from: inner.de on June 07, 2006, 03:40 PM
Here's what I'm talking about:
oh.
Why use the registry for index based items? use a file(s) :P

Warrior

Easier to manage and update, the downside is it isn't very portable across computers and OSes.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

rabbit

Quote from: inner.de on June 07, 2006, 05:22 PM
Why would you have a colon in your name in the first place.

warz, shh. :p

edit: I would make it so when they go to create a profile, if it contained a ":" in it, I would say do not use it.
I use the account :+:TheEND often enough.  Besides, restricting what usernames can be used isn't a good idea.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

vuther.de

I got it working, thanks everyone.