Error Reading File

Arimus

Recruit
Joined
Sep 10, 2006
Messages
21
Reaction score
0
Location
Pittsburgh
Country
llUnited States
I'm guessing that I when I messed with the OOB file I deleted a unit I shouldn't have and now the scenario won't load completely.
Is there any way to locate the problem and correct it short of going back to scratch?
Thanks
 

Mini-Me

Senior Member
Joined
Oct 28, 2004
Messages
846
Reaction score
87
Location
A cotton field
Country
llUnited States
Could you start from the beginning? Ie, what you were trying to do with which title, scenario, etc...
 
Joined
Mar 24, 2005
Messages
444
Reaction score
4
Location
OK
I'm not sure what you did to the oob file, but one thing you can do is pull the .oob file off of the cd and replace the one you think is broken.
 

Mini-Me

Senior Member
Joined
Oct 28, 2004
Messages
846
Reaction score
87
Location
A cotton field
Country
llUnited States
Whenever messing with an OOB or PDT file, make a copy of the original file and save it with a different name. Always. I speak from experience. :crosseye:
 

Arimus

Recruit
Joined
Sep 10, 2006
Messages
21
Reaction score
0
Location
Pittsburgh
Country
llUnited States
Getting the original OOB file and restoring it is not a problem, but doing so will cause other problems and I will lose the work I have done to the OOB.

I take it there is no way to track down the offending unit. No debug flag with a log file or anything like that?
 
Joined
Mar 24, 2005
Messages
444
Reaction score
4
Location
OK
Nope... the only way to track it down is good old brute force elbow grease.

One little trick I've seen in other games (never edited in the PzC games, but it works in the others), is open the scenario in the scenario editor. Look very closely at the Units dialogue. If it cuts off in a wierd place, that's the spot to focus your hunt (that's usually a begin/end problem)
 

Arimus

Recruit
Joined
Sep 10, 2006
Messages
21
Reaction score
0
Location
Pittsburgh
Country
llUnited States
I noticed that, but I thought there might be a better way. After all, do you think the designers hunt for errors by trying to guess what unit was in that spot when the errors started?
 

rahamy

HPS Games Forum Moderator
Joined
Jun 3, 2004
Messages
2,531
Reaction score
3
Location
Virginia, USA
Yes, but then again we make numerous backup copies before making changes so restoration is easy. :cool:
 

rahamy

HPS Games Forum Moderator
Joined
Jun 3, 2004
Messages
2,531
Reaction score
3
Location
Virginia, USA
Oh, and generally speaking, I never edit an OOB that has scenarios made from it already...unless it is to just change a name or something. Changing the file structure prevents existing scenarios from loading properly.
 

Arimus

Recruit
Joined
Sep 10, 2006
Messages
21
Reaction score
0
Location
Pittsburgh
Country
llUnited States
I think you guys are missing the point and I'm willing to bet there is a command line debug flag.
Restoring from even 1 hour ago is silly and manually making mutiple file backups is a wasteful time sink. There is already code that picks up the error and gives a message. How much would it be to add the name of the offending unit or an error code in the same message box that tells you "Error reading file"?
 
Joined
Mar 24, 2005
Messages
444
Reaction score
4
Location
OK
Arimus,
Rich Hamilton is a scenario designer for HPS, so if there were such a beast, he'd know about it. Maybe there should be, but unless the PzC engine is different than the ones I work in, there is none.
 

RickyB

Recruit
Joined
Aug 19, 2005
Messages
21
Reaction score
0
Location
Colorado
Country
llUnited States
Arimus said:
I'm guessing that I when I messed with the OOB file I deleted a unit I shouldn't have and now the scenario won't load completely.
Is there any way to locate the problem and correct it short of going back to scratch?
Thanks
If it is a missing unit in the OOB that is still referenced in the scenario, do the following. Locate where the last unit draw on the map is, before the error. If no units are drawn, then it is probably a different problem than a missing unit. The units are drawn on the map left to right, top to bottom, so just scroll left to right and find the map column with the last unit in it, then find the hex coordinates for that last unit drawn.

Then open the scenario in a text editor. Do a find for the hex coords, wiht a space between the two coords - ie 28,112 you would search for 28 112. Assuming it us a missing unit, it will be at this hex coord - if two units drew in that hex but the file shows 3 with those coords, then the problem would be the third, or if all drew in the last hex drawn, then it would be the next line in the file that is the problem. Delete the offending line and you should be fine, assuming it is only one unit.

If that doesn't help you, feel free to send me the file at rbancroft(@)att.net.

Rick
 

Arimus

Recruit
Joined
Sep 10, 2006
Messages
21
Reaction score
0
Location
Pittsburgh
Country
llUnited States
Thanks for the procedure!
I found the error and fixed it in about 5 min.

You should consider posting that in the tips sticky.
 
Last edited:
Top