PDA

View Full Version : Error Reading File


Arimus
09 Sep 06, 21:34
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
09 Sep 06, 21:55
Could you start from the beginning? Ie, what you were trying to do with which title, scenario, etc...

Gary McClellan
09 Sep 06, 22:02
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
09 Sep 06, 22:08
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
09 Sep 06, 22:48
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?

Gary McClellan
09 Sep 06, 23:46
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
10 Sep 06, 00:10
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
10 Sep 06, 08:42
Yes, but then again we make numerous backup copies before making changes so restoration is easy. :cool:

rahamy
10 Sep 06, 08:43
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
10 Sep 06, 11:12
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"?

Gary McClellan
10 Sep 06, 13:16
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
10 Sep 06, 17:46
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
10 Sep 06, 18:19
Thanks for the procedure!
I found the error and fixed it in about 5 min.

You should consider posting that in the tips sticky.