|
第一步:
$ G' Y; b! ? }* }3 o0 A! ?treenode item = parnode(1);: n0 a6 y( w6 \* B1 P" a
treenode current = ownerobject(c);- f( I h: S9 o
treenode source=node("/source",model());7 ]- X( a: [2 `5 R
int port = parval(2);
2 u1 t( q/ c% J# y0 ~( \: ~- ]: q. u# X* [if(4 a) } w: c' y7 T
content(current)>=20
; o) P( K9 l, d& e)% |& ]6 d/ L% x! S+ B
sendmessage(source,current,1,0,0);
7 k6 N1 q5 |1 ~. b# h {return 1;) }, k7 m* y. e. M8 O1 d t
第二步:
5 a8 G9 z. t% g1 M- K2 Y& I/**Custom Code*/8 s. { C7 J+ c- n) g6 b# X( c
treenode item = parnode(1);- w* P4 S5 v$ ?, J" {& k5 C, a! T% K
treenode current = ownerobject(c);
( b4 |/ F; C" D' Z/ Btreenode source=node("/source",model());
, F2 Q2 H7 h. ]( K( S. r4 Y( Cint port = parval(2);
1 ]: G( d9 G C! O9 j/ y3 bif(
, n$ N4 g1 M4 G) Z content(current)<5
& l9 V) E: ~+ A6 d& })
* [5 \" S2 H5 F! `( P* R/ dsendmessage(source,current,2,0,0);1 `! ~) h5 X& [" ^ R {7 I; ~
return 5;
# q3 i# p! z3 y0 B第三步:+ U4 }1 Z. u9 [/ B
' _4 v- q. ?8 l# O; s/**Custom Code*/
0 f, E2 h1 H1 q, B0 l% W8 vtreenode current = ownerobject(c);
T! I3 d/ _' N' ?; R) i; t }: punsingned int uservalue=(unsigned int) msgparam(1); U, }4 d5 I" R- x4 ^' Y
switch(uservalue){ b: P1 b" o! [8 q
case 1:closeoutput(current);break;7 j5 e1 j# [$ z) @4 F' U9 R3 v J7 ]
case 2 penoutput(current);break;0 L4 w7 p! i6 K8 h( {) Y5 g4 a* }" \& c
}
& D2 s9 B1 [4 [$ l4 U7 J最后系统报错是第三步,说是没有定义uservalue:
1 m1 v" G2 y7 ~, L: A
1 n5 y) g) b/ l% F2 W9 ~4 D Uline 3 unknown variable "unsingned"
# {1 b9 a/ |! }" D# H1 d6 d2 a+ r" f9 {, x
line 3 syntax error, unexpected type identifier, expecting ';'! h$ G$ [# T6 y7 J8 G
Could not finish parsing because of previous errors.
3 g9 O: Z4 f j+ V. L$ Z$ U: [/ I# t( U, J- F$ z" `
请问各位大大这是怎么一回事.... |
|