mIRC Homepage
Posted By: Online /hsave bugs - 23/09/03 09:37 PM
Yes I know similar problem was already reported but here's a simple code that easily reproduces it:
Code:
//hadd -m table item | hsave -b table file.txt

As you can see, a binary /hsave has difficulties saving tables that contain empty items. It results in a partially-written file.txt and an ambiguous error message. On 6.03 however it worked fine.

Also, /hsave reports a misleading error message ("insufficient parameters") when you try to save a table into an existing file. To reproduce:
Code:
//hadd -m table a b | hsave table file.txt | hsave table file.txt

What do you think should be the default behavior in this case? Appending to an existing file (if anyone finds that useful), overwriting it or just displaying an appropriate error mesage?

(OS: 98se)
Posted By: KingTomato Re: /hsave bugs - 23/09/03 09:44 PM
Yea, i was just playing with that and trying to time the speed of an hsave with or without the binary file and ntoiced that. Personally, i think overwrite should be the default, as you are saving the entire table, not just the newly added/deleted items. There could be an ammendment property tho for an alternative method.
Posted By: Online Re: /hsave bugs - 23/09/03 10:01 PM
Did you test it for the guy from the scripting board? smirk
Posted By: qwerty Re: /hsave bugs - 24/09/03 11:52 AM
I can reproduce the first bug (WinXP pro).

Regarding the second problem, mirc here spits out * /hsave: invalid parameters, which is not really descriptive of the error but not without sense either; I find it acceptable as a generic mirc error message. I think mirc reporting an error here is the desired/expected behaviour because you didn't use -a or -o with /hsave.
Posted By: Online Re: /hsave bugs - 25/09/03 11:29 PM
True blush

I was sure it gave an "insufficient parameters" message because I verified my post 20 times, but only that slipped from my mind...
© mIRC Discussion Forums