mIRC Home    About    Download    Register    News    Help

Print Thread
#108627 21/01/05 06:32 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
Code:
#HG on
alias HGon {
  if ($group(#greet) == off) {
    enable #greet
    echo 5 -a Hash greet has been turned on.
  }
  else {
    echo 5 -a Hash greet is already on.
  }
}
alias HGoff {
  if ($group(#greet) == on) {
    disable #greet
    echo 5 -a Hash greet has been turned off.
  }
  else {
    acho 5 -a Hash greet is already off.
  }
}
alias HGadd {
  if ($hget(greet)) {
    echo 5 -a Table greet found.
    hadd greet $address($$1, 0) $$?="Enter the  greeting."
    echo 5 -a Entry created for $$1 $+ .
    hsave greet " $+ $scriptdirgreet.hsh"
    echo 5 -a Table greet saved to greet.hsh
  }
  else {
    hmake greet 100
    echo 5 -a Table greet not found, creating table greet.
    hadd greet $address($$1, 0) $$?="Enter the greeting for $1."
    echo 5 -a Entry added for $$1 $+ .
    hsave greet " $+ $scriptdirgreet.hsh"
    echo 5 -a Table greet saved to greet.hsh
  }
}
alias HGdel {
  if ($hget(greet)) {
    echo 5 -a Table greet found.
    hdel greet $address($$1, 0)
    echo 5 -a Entry for $1 deleted.
  }
  else {
    echo 5 -a Table greet not found.
    echo 5 -a Entry cannot be present.
  }
}
alias HGclear {
  if ($hget (greet)) {
    hfree greet
    echo 5 -a
  }
}
menu nicklist {
  Hash Greet
  .On Off
  ..HG on:HGon
  ..HG off:HGoff
  .Table  
  ..Add:HGadd
  ..Delete:HGdel
  ..Clear:HGclear
}
#HG end
 

the add and delete commands will not work
why?
edit look all better wink

Last edited by ricky_knuckles; 21/01/05 06:52 AM.

The Kodokan will move you, one way or another.
#108628 21/01/05 06:33 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
quick ps.
im trying them through the popups
if thats part of the problem i dont know if you have to write it in the popup for $$1 to be treated as the highlighted nick rather than as the first typed parameter
edit:
i just tested the alias and it works fine with the $$1 typed in
so do i have to nix those 2 alaises and write them in the popup?

Last edited by ricky_knuckles; 21/01/05 06:35 AM.

The Kodokan will move you, one way or another.
#108629 21/01/05 06:44 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
PLEASE for the love of life, when you paste your code in use the link below the post window and click it its Code it well add the words [code] & [/code] place your code between them, then your code indenting well remain, ie:

Code:
alias blah {
  echo BLAH? whats that mean?
}


[edit]
odd i just looked at your post and u do use the code prefixes, but your still all jammed up on the left, are you coping the code directly from mirc script editor?

oh and as of your code, i didnt look if the aliases were correct of not just this, your not passing the aliases the $$1 so as far as there concerned $1 or $$1 is nothing aka they dont work.

Code:
menu nicklist {
  Hash Greet
  .on off
  ..HG on:HGon
  ..HG off:HGoff
  .add:HGadd $$1
  .delete:HGdel $$1
  .clear:HGclear
}


Last edited by DaveC; 21/01/05 06:51 AM.
#108630 21/01/05 06:50 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
umm i did that to begin with
the lack of indenting could be because i wrote this ina txt
but if your gonna be hissy and stuff
ill put it into mirc and make it indent just for you wink


The Kodokan will move you, one way or another.
#108631 21/01/05 06:55 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
thanks by the way
better than my theoretical solution
im glad i didnt muck with it until someone weighed in


The Kodokan will move you, one way or another.

Link Copied to Clipboard