mIRC Homepage
Posted By: Skip bizzare /hsave bug? - 30/08/03 04:56 AM
My bot seems to have made the transistion from 6.03 to 6.1 easily enough, except for this: (I added the echos just recently to try pick something obvious)

Code:
alias rdb_saveHash {
  var %name = $1 , %file = $+(%name,.rdb) , %hash = $+(ss-rdb_,%name)
  if (%name != $null) {
    if ($hget(%hash) != $null) { 
      echo -s Command: hsave -bou %hash $+(",%file,")
      echo -s Hash: $hget(%hash) File: $file($+(",%file,"))
      hsave -bou %hash $+(",%file,")
    }
    else { btrunc $+(",%file,") 0 }
  }
}


produces:

Command: hsave -bou ss-rdb_settings "settings.rdb"
Hash: ss-rdb_settings File: 62
-
* /ss-rdb_settings: error saving hash table 'settings.rdb' to 'hsave' (line 1379, script1.ini)
-

(the file already exists as this is a 'rolling' save done every 10 minutes via. timers)

... I wrote a basic test alias using the exact same /hsave format, in the same file (I haven't bothered changing this script to .mrc cos I didn't even realise I hadn't already - this is the first time its played up - there doesn't appeart to be any file corruption from the largish filesize or format), without complication, as well as trying from the editbox. The only thing that might be causing some weird behaviour is the way the alias is called:

Code:
alias rdb_save { .echo -q $rdb_saveHash(settings) $rdb_saveHash(trig) $rdb_saveHash(user) $rdb_saveHash(user_case) $rdb_saveHash(user_link) $rdb_saveHash(mail_user) $rdb_saveHash(mail_user_settings) $rdb_saveHash(mail_uidl) $rdb_saveHash(mail_uidl_settings) $rdb_saveHash(mail_link) $rdb_saveHash(mail_link_settings) $rdb_saveHash(chan) $rdb_saveHash(chan_case) $rdb_saveHash(user_settings) $rdb_saveHash(user_trig) $rdb_saveHash(chan_settings) $rdb_saveHash(chan_trig) $rdb_saveHash(chan_founder) $rdb_saveHash(chan_access) $rdb_saveHash(chan_access_level) $rdb_saveHash(chan_access_flags) $rdb_saveHash(chan_access_modes) $rdb_saveHash(chan_access_props) $rdb_saveHash(chan_access_title) $rdb_saveHash(chan_access_greet) $rdb_saveHash(chan_access_suspend) $rdb_saveHash(chan_access_pending) }


(thats gonna display weirdly in the browser isn't it :P)

And just testing now, it appears doing /hmake test and /rdbsaveHash test works fine. I guess I'll have to write the /rdbSave out onto multiple lines. smirk

Very ***confuzzled*** here.

update: it appears even after changing the /rdb_save alias to use an /rdb_saveHash <name> on each line instead of a .echo -q $rdb_save(name1) $rdb_save(name2) the bug is still occuring. Note extra emphasis on confuzzled now.
Posted By: gryphon5 Re: bizzare /hsave bug? - 02/09/03 07:29 PM
I'm having the same problem, even with just simply entering the /hsave command on its on (not in script) has the same error. It seems to be mixing up the table name and filenames, since it is trying to save to "hsave" no matter what filename you try and it thinks the file you are trying to save to is actually the name of the table.

I don't know if this is a bug in mirc, but it certainly seems like it.
Posted By: cold Re: bizzare /hsave bug? - 29/09/03 04:19 AM
Sadly I can't reproduce this..
© mIRC Discussion Forums