mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2005
Posts: 29
G
goth80 Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jul 2005
Posts: 29
The following code works, when loaded it defaults to .two (dunno y but its okay), subsequently when i click "QueryLimit/one" and do a "/dnow" the var changes to paul, and when i click "QueryLimit/two", it changes back to john. But the code following it is broke the conditions dont transfer into the var, I get the echos "done one/two" though the var %qlmt is skipped (doesnt eval.. dunno) though the "do stuff is executed. The only condition that is met is "if ($me isop #channelname)".

......:: this code works
Code:
  
menu * {
  QueryLimit
  .one : .name one
  .two : .name two
}
alias name {
  if $1 == one {
    set %this paul
  }
  elseif $1 == two {
    set %this john
  }
}

.
.
.

alias dnow {

  echo -a  how are you %this

}



......:: this code doesn't
Code:
 
alias qlimit {
  if $1 == one {
    set %qlmt (($hget(qcount,$address($nick,3)) == $null ) || ($hget(qcount,$address($nick,3)) > 0 ))
  echo -a done one
    }
  elseif $1 == two {
    set %qlmt ($hget(qcount,$address($nick,3)) > 0 )
  echo -a  done two
    }
  }

.
.
.

if ($me isop #channelname) && %qlmt {

do stuff

}


Your assistance is truly valued


Whats life without a little Karma?
maddkarma[dot]com
Joined: Feb 2005
Posts: 74
S
Babel fish
Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
Code:
alias qlimit {
  if ($1 == one) {
    set %qlmt ($hget(qcount,$address($nick,3)) == $null) || ($hget(qcount,$address($nick,3)) > 0 )
  echo -a done one
    }
  elseif ($1 == two) {
    set %qlmt ($hget(qcount,$address($nick,3)) > 0)
  echo -a  done two
    }
  }


.

.

.


if ($me isop #channelname) && %qlmt {


do stuff


}
  


Have to work..!!


[color:red]m[color:blue]IRC[color:green] for EvEr

Joined: Jul 2005
Posts: 29
G
goth80 Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jul 2005
Posts: 29
Nope.. SkyD.... doesn't work

Thanks for the attempt.


Whats life without a little Karma?
maddkarma[dot]com
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 alias qlimit {
  if $1 == one {
    $iif((($hget(qcount,$address($nick,3))) == $null),unset %qlmt, set %qlmt $hget(qcount,$address($nick,3))
  echo -a done one
    }
  elseif $1 == two {
    set %qlmt ($hget(qcount,$address($nick,3)))
  echo -a  done two
    }
  }
.
.
.
if ($me isop #channelname) && %qlmt {
do stuff
} 


I was having a hard time telling what you were wanting to set %qlmt to in $1 == one.

As above, if $1 == one and $hget(qcount,$address($nick,3)) has a value, then %qlmt is set to that value, otherwise %qlmt is unset.

If $1 == two, then %qlmt is set to the value of $hget(qcount,$address($nick,3)) without confirming that there is a value in that location

Joined: Jul 2005
Posts: 29
G
goth80 Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jul 2005
Posts: 29
Sorry for my miscommunication.

What i wanted to do was write the line of code to the variable, "not" the result of the condition/code.

so depending on which button was selected, the line of code would change and eval where it was placed.

to
(($hget(qcount,$address($nick,3)) == $null ) || ($hget(qcount,$address($nick,3)) > 0 ))

or

($hget(qcount,$address($nick,3)) > 0 )

respectively

I'll have to rethink the logic of it to better articulate what im after. Thank you much RusselB for your efforts in trying to unscramble my intentions. I regret not articulatng myself effectively.

Last edited by goth80; 28/07/05 07:22 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I don't think you can put the code into a variable, sorry.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, if you're on command line, a single / will set the variable to include the code rather than the results. It doesn't seem to work in remotes, tho.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard