mIRC Home    About    Download    Register    News    Help

Print Thread
#19388 15/04/03 11:02 PM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
there is something worng with the addoperline code it doesnt like to add more lines to it it just writes over in the vars

Code:
dialog Opers {
  title Oper Stats Script.
  size -1 -1 201 201
  option dbu
  tab Oper Lines, 1,             1 1 200 200,
  tab Oper Commands, 2,
  tab List Line Stats, 3,
  tab Opers Online, 4,
  button C Line, 5,              1 20 50 12,            ok,              tab2
  button D Line, 6,              1 35 50 12,            ok,              tab2
  button d Line, 7,              1 50 50 12,            ok,              tab2
  button E Line, 8,              1 65 50 12,            ok,              tab2
  button e Line, 9,              1 80 50 12,            ok,              tab2
  button f Line, 10,             1 95 50 12,            ok,              tab2
  button F Line, 11,             1 110 50 12,           ok,              tab2
  button G Line, 12,             1 125 50 12,           ok,              tab2
  button H Line, 13,             1 140 50 12,           ok,              tab2
  button I Line, 14,             1 155 50 12,           ok,              tab2
  button K Line, 15,             1 170 50 12,           ok,              tab2
  button L Line, 16,             55 20 50 12,           ok,              tab2
  button m Line, 17,             55 35 50 12,           ok,              tab2
  button n Line, 18,             55 50 50 12,           ok,              tab2
  button N Line, 19,             55 65 50 12,           ok,              tab2
  button O Line, 20,             55 80 50 12,           ok,              tab2
  button Q Line, 21,             55 95 50 12,           ok,              tab2
  button q Line, 22,             55 110 50 12,          ok,              tab2
  button r Line, 23,             55 125 50 12,          ok,              tab2
  button S Line, 24,             55 140 50 12,          ok,              tab2
  button s Line, 25,             55 155 50 12,          ok,              tab2
  button T Line, 26,             55 170 50 12,          ok,              tab2
  button t Line, 27,             109 20 50 12,          ok,              tab2
  button U Line, 28,             109 35 50 12,          ok,              tab2
  button u Line, 29,             109 50 50 12,          ok,              tab2
  button V Line, 30,             109 65 50 12,          ok,              tab2
  button v Line, 31,             109 80 50 12,          ok,              tab2
  button W Line, 32,             109 95 50 12,          ok,              tab2
  button Y Line, 33,             109 110 50 12,         ok,              tab2
  button Kill User, 34,          109 125 50 12,         ok,              tab2
  button Cancel, 800,            109 170 50 12,         ok,              tab2
  list 35,                       10 30 180 150,         extsel, vsbar,   tab1
  box Operlines, 36,             8 21 184 158,                           tab1
  button Add Operline, 37,       10 180 50 12,          ok,              tab1 
}
dialog addoperline {
  title Add Operline.
  size -1 -1 106 90
  option dbu
  box Add Operline, 1,           3 3 100 60,
  text Oper Handel:, 2,          5 15 50 12,
  edit "", 3,                    50 12 50 12,
  text Oper Password:, 4,        5 26 50 12,
  edit "", 5,                    50 24 50 12,
  text Server:, 6,               5 38 50 12,
  edit "", 7,                    50 36 50 12,
  text Operline Name:, 8,        5 50 50 12,
  edit "", 9,                    50 48 50 12,
  button Cancel, 10,             5 65 45 12,           cancel,
  button Ok, 11,                 50 65 45 12,           ok,
}
dialog operline {
  title Oper Stats Script.
  size -1 -1 133 37
  option dbu
  text %oper.line.abouttext $+ :, 1,  1 1 150 50,
  edit "Line who?", 2,                1 10 130 12
  button Ok, 3,                       1 23 50 12,         ok,
  button Cancel, 4,                   80 23 50 12,        cancel,
}
on *:DIALOG:addoperline:init:*: {
  did -ic $dname 1 1 operline %operline.name.1
  did -ic $dname 2 2 operline %operline.name.2
  did -ic $dname 3 3 operline %operline.name.3
  did -ic $dname 4 4 operline %operline.name.4
  did -ic $dname 5 5 operline %operline.name.5
  did -ic $dname 6 6 operline %operline.name.6
  did -ic $dname 7 7 operline %operline.name.7
  did -ic $dname 8 8 operline %operline.name.8
}
on *:DIALOG:addoperline:sclick:11: {
  if ($did(3,addoperline) == $null) { .echo *****ERROR DO IT AGIAN }
  if ($did(5,addoperline) == $null) { .echo *****ERROR DO IT AGIAN }
  if ($did(7,addoperline) == $null) { .echo *****ERROR DO IT AGIAN }
  if ($did(9,addoperline) == $null) { .echo *****ERROR DO IT AGIAN }
  else {
    .set %operline.handel. $+ %op# $did(3,addoperline)
    .set %operline.password. %+ %op# $encode($did(5,addoperline))
    .set %operline.server. %+ %op# $did(7,addoperline)
    .set %operline.name. %+ %op# $did(9,addoperline)
    if (%op# >= 30) { .echo you have reached your max del some then do it again. }
    else { .inc %op# 1 }
  }
}
on *:DIALOG:opers:sclick:37: { .dialog -md addoperline addoperline }

on *:DIALOG:operline:sclick:3: {
  . $+ %oper.kick $did(operline,2)
  . dialog 
} 
on *:DIALOG:opers:sclick:5: {
  set %oper.kick cline
  set %oper.line.abouttext Enter a nickname to C-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:6: {
  set %oper.kick Dline
  set %oper.line.abouttext Enter a nickname to D-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:7: {
  set %oper.kick dline
  set %oper.line.abouttext Enter a nickname to d-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:8: {
  set %oper.kick Eline
  set %oper.line.abouttext Enter a nickname to E-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:9: {
  set %oper.kick eline
  set %oper.line.abouttext Enter a nickname to e-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:10: {
  set %oper.kick fline
  set %oper.line.abouttext Enter a nickname to f-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:11: {
  set %oper.kick Fline
  set %oper.line.abouttext Enter a nickname to F-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:12: {
  set %oper.kick Gline
  set %oper.line.abouttext Enter a nickname to G-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:13: {
  set %oper.kick Hline
  set %oper.line.abouttext Enter a nickname to H-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:14: {
  set %oper.kick Iline
  set %oper.line.abouttext Enter a nickname to I-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:15: {
  set %oper.kick Kline
  set %oper.line.abouttext Enter a nickname to K-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:16: {
  set %oper.kick Lline
  set %oper.line.abouttext Enter a nickname to L-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:17: {
  set %oper.kick mline
  set %oper.line.abouttext Enter a nickname to m-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:18: {
  set %oper.kick nline
  set %oper.line.abouttext Enter a nickname to n-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:19: {
  set %oper.kick Nline
  set %oper.line.abouttext Enter a nickname to N-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:20: {
  set %oper.kick Oline
  set %oper.line.abouttext Enter a nickname to O-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:21: {
  set %oper.kick Qline
  set %oper.line.abouttext Enter a nickname to Q-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:22: {
  set %oper.kick qline
  set %oper.line.abouttext Enter a nickname to q-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:23: {
  set %oper.kick rline
  set %oper.line.abouttext Enter a nickname to r-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:24: {
  set %oper.kick Sline
  set %oper.line.abouttext Enter a nickname to S-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:25: {
  set %oper.kick sline
  set %oper.line.abouttext Enter a nickname to s-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:26: {
  set %oper.kick Tline
  set %oper.line.abouttext Enter a nickname to C-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:27: {
  set %oper.kick tline
  set %oper.line.abouttext Enter a nickname to t-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:28: {
  set %oper.kick Uline
  set %oper.line.abouttext Enter a nickname to U-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:29: {
  set %oper.kick uline
  set %oper.line.abouttext Enter a nickname to u-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:30: {
  set %oper.kick Vline
  set %oper.line.abouttext Enter a nickname to V-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:31: {
  set %oper.kick cline
  set %oper.line.abouttext Enter a nickname to C-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:32: {
  set %oper.kick vline
  set %oper.line.abouttext Enter a nickname to v-Line
  dialog -md confirm operline
}
on *:DIALOG:opers:sclick:33: {
  set %oper.kick kill
  set %oper.line.abouttext Enter a nickname to Kill
}
alias /opstats { dialog -md Opers Opers }


Need amazing web design for low price: http://www.matrixn3t.net
#19389 16/04/03 07:56 AM
Joined: Feb 2003
Posts: 47
G
Ameglian cow
Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 47
[from help file]
$did(name,id)
[/from help file]

you are calling it the other way around:

[from script]
.set %operline.handel. $+ %op# $did(3,addoperline) .set %operline.password. %+ %op# $encode($did(5,addoperline)) .set %operline.server. %+ %op# $did(7,addoperline) .set %operline.name. %+ %op# $did(9,addoperline) if (%op# >= 30) { .echo you have reached your max del some then do it again. } else { .inc %op# 1 } }
[/from script]

first the name of the dialog, then the id of the control

#19390 16/04/03 09:24 AM
Joined: Feb 2003
Posts: 282
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
P.S.
Code:
 
Instead of having a lot of "on *:DIALOG:opers:sclick:?: {"

you can just write:

on *:dialog:opers:*:*:{
  if ($devent == sclick) { 
    if ($did == 1) {
    do the stuff you wanna do  
    }
    if ($did == 2) {
    do the stuff you wanna do
    }
  }
}
 




Link Copied to Clipboard