View Single Post
Old 05-23-2005, 07:16 PM   #159
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
One of the most exciting part of this is adding a new function. But depressing to find out later that there are complications with it. Like the rating system report.

First run on a current player, it worked great. Then I notice that if the player left in 2005, it displays the ratings for 2006 and later for the guy that took over his ID. Fixed it. Then I notice that the layout won't work if they guy has more than 15 years in his pocket. So, redesign of the layout. OK, no problem, had a couple text boxes go crazy and had to redesign them, not a problem.

So, I shifted my work to working on the retired players in utilities. Had a bug there, fixed it. The FIND was looking in the current players first, it needed to look in the retired players first. No problem.

So, back to the ratings. It is just displaying active players. Let's add a retired player check. Ok, not easy.

Let's look in the retiredplayer index I created. Ah, good, there he is. But, his Rxxxx number is not the same as the pxxxx number that he originally had. Crap. Ok, thats ok. Lets go see what it was.

So, here is what happens. You type in part of his name and it displays all of the possible people. You see your match and click on his. It loads in the retired player index and sees if his name is in there. If it is not, then it skips this section and goes to the rest of the rating display, and that part works. But, if he is retired, it sets a flag and then starts a possible long process. It looks in the almanac/first year folder and loads in each player in there and checks to see if this is the guy. If it is, it marks his original P number down and moves to the rating section and 'ta da', the correct information is displayed. Now why is it a possible long process? Well, if he is player p1500.html in the first year, 2000, it searches through 1500 players then aborts the search because it found him. Not too long, a few seconds. But, what happened if this guy made his appearance in 2020? Well, it has to search 2001, 2002, 2003, etc., all the way until it finds his match. This could take time.

So, now I take another approach. Let's load in his retired page. Then let's look and see what year his first year was and start the search there. Ah, great idea! Wait, another idea. Since we now know his name, we can also grab his first team from there. Then let's load in his team roster sheet from his first year and from there, we can pull out his original ID. Ah, perfect. Now we know his original number was 1681. Now we can just run the normal routine and search for player ID of 1681 that matches his name. Ah, problem solved.

What fun!!

I will have an update late tonight that has this function.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote