|
第一步:6 J6 V4 }6 {! h5 ]+ @/ e, L' s7 m9 _
treenode item = parnode(1);- q& S. v$ ^; n9 S
treenode current = ownerobject(c);
5 W9 @0 ]3 U' b" {treenode source=node("/source",model());9 B( Y# K; c4 @
int port = parval(2);
! f# W$ V6 K: f3 jif(
2 b: x5 P3 h4 {+ H8 V, v1 w1 Z1 K7 A content(current)>=205 }" w# Q. u2 R/ ?( n1 P
)
* \7 E2 ~( U2 osendmessage(source,current,1,0,0);3 e7 t8 U( a* N2 l: C
return 1;2 g+ P9 F8 q/ j8 @/ c
第二步:' |. }1 [2 d. Y$ g3 P5 C
/**Custom Code*/# X/ ?2 G2 T0 o+ X# ^" ^
treenode item = parnode(1);
0 h% y4 P4 I( r4 x7 N2 ptreenode current = ownerobject(c);
7 W5 K. w4 Z- ` O# e3 ~# ctreenode source=node("/source",model());5 b3 _% d% _# J
int port = parval(2);8 l- K a& N& G8 e6 C9 g& V" J; e
if(; H+ z) e' Z% W8 T5 z k
content(current)<5: ]6 J: S' B- u0 Y& }, A" S
)' n% Y0 c/ Q4 `+ X2 l/ {
sendmessage(source,current,2,0,0);5 I7 \- [' l- u: { y
return 5;
* z- e# u/ V9 _( c& ~第三步:$ L3 O8 q; e# l- j9 B
9 j8 }0 a1 O8 w4 |6 J; T/**Custom Code*/
+ `: k7 {; b# u( X7 Htreenode current = ownerobject(c);; L/ s' w5 L% h! v* p4 q7 U
unsingned int uservalue=(unsigned int) msgparam(1);
* ~4 D7 z6 `: G3 Mswitch(uservalue){
5 f* d/ F9 P0 }& @# \' ] case 1:closeoutput(current);break;' }% B/ J& T9 R) U6 b+ o% L) P
case 2 penoutput(current);break;7 A. S+ k7 M( Q, ~0 _
}4 O' ^3 d! T- K0 J9 P2 W
最后系统报错是第三步,说是没有定义uservalue:
# K5 S' @1 W4 s$ t k' x& V+ E1 ?4 M2 V- N6 c5 w6 M
line 3 unknown variable "unsingned"! Q! n& V( Q. }, b
1 |4 m+ k# ~0 Z
line 3 syntax error, unexpected type identifier, expecting ';'
4 s! P# m( A/ w# }Could not finish parsing because of previous errors.4 Y& ]# b1 {" v) w7 v
: G7 x8 y+ t4 k- m请问各位大大这是怎么一回事.... |
|