View Single Post
Old 05-21-2005, 03:00 PM   #130
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
BUG FIND!

Not in my program, in OOTP. If you create a historical year, like I did for 2000 and you have a AL team and a NL team, they are both assigned the save abbreviation by default.

I had to do a work around. Very tricky. What I had was this:

New York (AL)
New York (NL)
Chicago (AL)
Chicago (NL)

The abbreviations assigned by OOTP were: ny and ny and c( and c(

So, what I had to do was when indexing the teams, I had to determine which team was in the AL and which one was in the NL. Since I already had determined the team numbers, that was pretty easy. Take 1/2 the total teams, if in upper half, then team is AL, if in lower half, team is in NL. So, now I can search the boy.txt file (batter of the year) for NY and AMERICAN (both in the same line) and know which NY this batter of the year was.

Uh oh.. what happens if your leagues are NOT called AMERICAN and NATIONAL. Ah.. another pain... ok, let's read in the BOY.TXT file and read the first three lines. It it says:

6 2000 Winners

<b>American League:</b> CF Victor Marrero, NY, (548 AB, .349 AVG, 39 HR, 118 RBI, 122 R, 191 Hits, 1.032 OPS)
<b>National League:</b> RF Dan Milliken, C(, (576 AB, .351 AVG, 53 HR, 131 RBI, 129 R, 202 Hits, 1.124 OPS)

Ah, ok, strip away the HTML and then pull everything left of the first : and save it as the league names.

Ah, so smart.. and it works!!!

Woo hoo!
__________________
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