|
第一步:
# d( @9 u8 N/ }; Z6 `6 Etreenode item = parnode(1);7 y0 o9 d: x# \" h8 y2 Y' ]7 ?% M
treenode current = ownerobject(c);* n8 U0 A8 A$ ~. g# e. i( r3 _/ d: E
treenode source=node("/source",model());9 F$ B* [; t6 \. H% o9 r/ v
int port = parval(2);
2 m3 V( n! f2 @if(( j" Q4 \( ^- @) O& S) }$ ~0 b4 Y' a
content(current)>=20
9 n6 X; b% l7 V0 s5 n0 k)
+ B. ^/ o3 E0 m1 K+ Hsendmessage(source,current,1,0,0);
9 G0 H1 d1 G7 Rreturn 1;" M5 D8 ?0 B( q( d( m& o% v; f& h
第二步:. q/ k* `: g+ G3 S# k. O: ]
/**Custom Code*/
$ T e3 H1 Q) Q4 N/ ^" ]treenode item = parnode(1);: \0 L" y+ h1 {" I9 U" g( s
treenode current = ownerobject(c);" ] U- ~, d6 l4 ?
treenode source=node("/source",model());6 ]; q$ F" {( K- b7 D
int port = parval(2);
$ P' N- x0 P* r* |if(
0 y3 O, v5 p4 c" } content(current)<5
; t3 O$ M r6 n4 Z( N4 G d)7 U3 A9 v! I/ W* A
sendmessage(source,current,2,0,0);; O& v$ N3 p+ K) n4 M/ P0 z
return 5;
( j E6 t; e& g+ |8 x第三步:
' H; e4 M, k, e2 D( Y% t& f
2 N0 m4 L$ L% h/**Custom Code*/
s% r- g1 h Streenode current = ownerobject(c);
. n" o: G' P, l6 _0 {unsingned int uservalue=(unsigned int) msgparam(1);
! A$ z G( b5 A; j @' y" `switch(uservalue){
) c4 }; k( [; d4 r) k case 1:closeoutput(current);break;
w" F( i4 ^$ C4 ?$ A0 i case 2 penoutput(current);break;8 S( B N4 T4 e1 e9 S8 T/ M
}
0 e& v) g x7 q9 o$ G最后系统报错是第三步,说是没有定义uservalue:
+ c* B+ r: ?0 L% S% w/ G
2 `6 q; l1 u9 _0 B+ Z- X! uline 3 unknown variable "unsingned"
1 a) a( U4 g8 U+ n# }" Z- _% M- _( ^
line 3 syntax error, unexpected type identifier, expecting ';'
3 v5 R3 f: b$ |3 ]1 ~4 ICould not finish parsing because of previous errors.6 r3 r4 q6 A5 ~ T/ f. q: n
' G/ M0 u k; [" H
请问各位大大这是怎么一回事.... |
|