Wednesday, February 23, 2005

Wednesday 23rd

After a couple of day's break from coding, I returned to the Editor to tackle an extremely quirky problem that had plagued Monday night's coding session; I'd put in the code required to Load and Save the current Brush, but for some reason the Load code wasn't functioning correctly.

I examined my code, made a few more tweaks, but the problem still persisted: if I grabbed a Brush then saved it, I couldn't load the Brush back in during that session - I physically had to quit the editor then restart it, at which point the Brush would load in. This pointed to a problem with the save routine, so I included a CloseFile command - but to no avail.

Tonight, as is typical with stubborn bugs, I solved the problem in about 30 seconds - the CloseFile command has to be applied to the variable used to read/write the data, and not by using the filename (as I had been doing). This tweaked, everything was working beautifully, and you can now quick-save a Brush and load it back in with ease.

The final task of the night was to fix a small bug in the Mini-Map routine I worked on in January; this was never completely finished, due to the fact that I wanted to tweak a couple of things after I implement the facility to change the map size. The bug was a quick fix, however, and merely needed to check and adjust a couple of display variables if the map was below a certain size.