mIRC Home    About    Download    Register    News    Help

Print Thread
hadd only works if i use -s... #177358 23/05/07 10:42 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
I have never had a problem with hadd before. But in this script i'm working on if i just use hadd -m table item info it doesn't get added to the table. If i just put in the -s switch it does for some reason. But I don't want to have -s there... If I manually type in what I want to add it works but in my script it doesn't. It's weird.
Code:
  var %searchhashtable = $hget(mashtable,$2)
  if (!%searchhashtable) {
    hadd -sm mashtable $2 $3-
  }


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: hadd only works if i use -s... [Re: Scorpwanna] #177366 23/05/07 11:04 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I've never had this problem, and I am unable to duplicate it.

Have you tried using /echo -a $hget(mashtable,$2) after the hadd statement (without the s switch)?

To my knowledge, and I've been working with hashtables for quite some time now, the -s switch only shows what is stored in the table (likewise with most of mIRC's other commands regarding storage of information).

Re: hadd only works if i use -s... [Re: RusselB] #177367 23/05/07 11:07 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
It appears to be working now... I just shut down mirc and restarted it and it's fine...


We don't just write the scripts, we put them to the test! (ScriptBusters)