mIRC Home    About    Download    Register    News    Help

Print Thread
#125213 15/07/05 04:34 PM
Joined: Jul 2005
Posts: 5
P
pinchux Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jul 2005
Posts: 5
here is a simple dialog

Code:
 dialog Options {
  title "Options"
  size -1 -1 145 121
  option dbu
  button "OK", 1, 27 93 37 12, ok
  button "Cancel", 2, 87 93 37 12
  tab "Sounds", 3, 9 9 125 77
  check "Op", 4, 15 26 50 10, tab 3
}
 


and this is not workink (below). why?


Code:
 on 1:dialog:options:sclick:*: {
  if ($did(4).state = 1) { %check1 = on } | else { %check1 = off }
}
  

#125214 15/07/05 05:34 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Works fine for me. I pasted it in and tried it.

//echo -a %check1

This gives on/off depending on the state.


Invision Support
#Invision on irc.irchighway.net
#125215 15/07/05 08:45 PM
A
Anonymous
Unregistered
Anonymous
Unregistered
A
if ($did(4).state = 1)

not working because you need double "="

if ($did(4).state == 1)

#125216 15/07/05 08:54 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You actually don't. It's better to, but it isn't necessary.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard