Today I debugged the script. I thought that there was one bug, but it turns out that there were two separate bugs. The two bugs were not related – only in that both were careless typos.
The first bug was causing the server to log a high volume of errors; this happened when a person on a challenge bumped a non-monster, like an NPC or even another player (I imagine). This was a stupid error on my part, as I had typed
if ( ! target.thingType == kThingMonster ) continue;
instead of
if ( target.thingType != kThingMonster ) continue;
So yeah, that was filling the server log with errors. Whoops! The second bug was the way that I had parsed the Iron Man mode. This took me a little while to understand (as at this time I was still convinced that there was one bug, not two separate bugs), but after putting in a couple of lines of debugging code I saw what I had done wrong – a silly mistake, really – and fixed it right away.
What a relief. Now I may return to the mannequin bug. I think I will need to reread the script, as I have forgotten the problem!
No comments:
Post a Comment