mIRC Home    About    Download    Register    News    Help

Print Thread
#50983 23/09/03 09:37 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline OP
Hoopy frood
OP Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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)

#50984 23/09/03 09:44 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
#50985 23/09/03 10:01 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline OP
Hoopy frood
OP Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Did you test it for the guy from the scripting board? smirk

#50986 24/09/03 11:52 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#50987 25/09/03 11:29 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline OP
Hoopy frood
OP Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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...


Link Copied to Clipboard