ID:189620
 
(P.S. - that's prescript, not postscript! =P Wasn't really sure where to put this, as it's more of a warning/rant than anything, so I guess Off Topic will do.)

I just spent three entire days trying to track down an elusive bug. The problem? Well, where to start...

I gave /obj/skill items a var called "skillowner" that tracked the owner of the skill item. So far so good. When I loaded up my character, the var was set correctly. But mere seconds afterwards, it mysteriously reverted to null. I spent three days and about 500 debug messages trying to work out why this was so. I searched my code for references to "skillowner", and looked for anything that could set it to null (there was nothing that could do that without me knowing about it; I really did have several hundred debug messages!). I agonised over the problem, tore my hair out, wasted many hours that would have been better spent on school assignments, only to discover - about ten minutes ago - the problem.

The var was null in my old savefile.

All I needed to do was delete the savefile and recreate my character.

This, I believe, requires the biggest DOH! in the history of BYOND programming. o_0
Happens to me all the time. The worst thing is when you making a new system, and you use some place holder verbs to call the proc so you can get the guts of the system ready.
Then you find a bug, and keep going at it for days on end trying to fix it, rewriting the entire system. Then you think, "Ok, I'll just go ahead and do the rest, then come back to it.", and after you've finished you realise, "Hey... I had proccall() instead of proccall(23)....".
Hehe don't feel too alone on that, I spent one day a few months ago debugging and debugging trying to figure out the same problem. Finally figured out it was saving the null in the savefile to the var I was using.
That kinda remindes me of this one time I was making a Battle system not to advanced or any thing. And I not knowing named the attack() verb and a proc/attack() so the comp was going to the wrong one and I couldnt figure out why it wasnt working. Of course after a day of printing out the code and looking it over I saw my mistake right off.

I guess you just have those days.
In response to Kunark
Heh. Thing was, the var hadn't existed when I made the old savefile, so it was the default value (null) when loaded. If I'd implemented auto-saving on logout (or thought to save my character again), it would have been MUCH easier to track down. =P