mIRC Home    About    Download    Register    News    Help

Print Thread
#166963 17/12/06 04:33 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
How come this dosent work?
Code:
alias testar {
  if ($input(Wrong settings $+ $chr(44) do you want to retry?,8) == $true) { do stuff }
}

it wont do anything. dont know what i missed here. Shouldent that return $true of $false?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #166968 17/12/06 05:38 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I had the same problem, and ended up having to use a little workaround
Code:
alias testar {
  var %testar = $input(Wrong settings $+ $chr(44) do you want to retry?,y)
  if %testar {
    ;do stuff
  }
}


I don't know what the 8 in your $input was for, so I omitted it, and added the switch to return Yes and No buttons, rather than OK and Cancel. If the 8 was for a timeout, then you were missing the required k parameter to indicate that the number is for the timeout allotment(sp?)

sparta #166970 17/12/06 05:57 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
If you're not sure what something is supposed to return, simply check it using /echo:

//echo -a $input(Wrong settings $+ $chr(44) do you want to retry?,8)

Now burn this advice into your brain, it's your #1 debugging tool.

On another note, there is no reason to confuse yourself with numbers for the 2nd $input parameter. mirc added support for letter switches (which make more sense) a long time ago, you should probably start using them.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard