|
第一步:
( X0 F* d, r% I( ]/ z. y# p- btreenode item = parnode(1);
5 J' S4 X( T3 X+ ^# J$ ^0 ]treenode current = ownerobject(c);. Y/ [' k. p5 u5 ]3 _& U
treenode source=node("/source",model());$ t7 ?1 R5 Z0 E& I$ S$ w0 n! a4 k
int port = parval(2);" y% Q& @. J6 D t* H, c
if(
& R* e* x5 M7 z& K! K content(current)>=20
. s" Y4 n* g$ V2 C0 j* C2 w' ]# X), p2 z: \/ ]% H/ [ k2 g
sendmessage(source,current,1,0,0);
3 ]3 f9 \ y, a4 W6 u) }return 1;
* j0 [" Z. s F3 i6 f* V第二步:4 Y$ A/ {4 v/ {+ |6 G6 G$ o: P
/**Custom Code*/( R( z% n+ S X9 }5 H0 Y4 B6 [
treenode item = parnode(1);2 A. }" h5 l) I6 k
treenode current = ownerobject(c);
5 o7 r: V7 w, u3 V2 R! g& atreenode source=node("/source",model());* ~- S* }. s! w$ r6 ]
int port = parval(2);
; _ F7 i9 i B3 M" X" q+ o* Jif($ x$ p6 p7 A. J1 k8 E
content(current)<59 @9 j" K, W3 C9 M$ s+ Z" }- e
)
- C( f( f. j: c+ A4 Tsendmessage(source,current,2,0,0);
6 H( |6 ?6 e. ^1 d, ]0 x0 Areturn 5;! m) A% l; X% t
第三步:+ c# H# _5 ?1 m: i6 ?
! g+ N# s+ Z; s( o0 [/**Custom Code*/& H4 t- {: X) ^+ a
treenode current = ownerobject(c);
: z7 _& [/ ?8 g- t( I9 N; Bunsingned int uservalue=(unsigned int) msgparam(1);
& V$ ~" e& _- b/ d$ Z& Kswitch(uservalue){! P# J8 W1 X* ^' w5 j# L/ X* V
case 1:closeoutput(current);break;: ~% X& F3 x+ q0 `/ y6 O" M! C
case 2 penoutput(current);break;
4 u5 ~) Y7 ]* g}9 {1 c1 x' B% A
最后系统报错是第三步,说是没有定义uservalue:- x* l+ d& b* \* d8 }, a
6 f, ^& D' v6 m3 }2 x' `
line 3 unknown variable "unsingned"
3 P0 X6 U' l6 x$ u0 r$ j: [/ k; ~! c- a d
line 3 syntax error, unexpected type identifier, expecting ';'
6 g4 \# ~" l1 i, }1 L' PCould not finish parsing because of previous errors.
" U8 {1 ?8 T, O4 l' [' s
' l, M: y& c4 Y3 a: S% Z请问各位大大这是怎么一回事.... |
|