|
第一步:
% q5 S: S/ G- m/ i3 u" P% jtreenode item = parnode(1);
, u' u" V( D. b6 [' F% otreenode current = ownerobject(c);
0 M9 c$ I6 H4 Z7 k Ytreenode source=node("/source",model());
$ v- f% f3 v' h7 Qint port = parval(2);* }7 E! o8 m2 _5 l, z8 \, W
if(; Y3 y6 ^) g1 X4 ?
content(current)>=20
0 N9 g; E! }4 S5 S2 S: D)- @6 v, Z: c6 c' z* X, v
sendmessage(source,current,1,0,0);
y, r3 ^% a8 k+ D- \return 1;
4 H$ i9 r& g$ A& I p( y第二步:
1 ], n: M! Y% m+ P J+ w/**Custom Code*/ v* m8 R; f6 p+ y9 K; S
treenode item = parnode(1);
# L8 x8 l: P7 | w, Streenode current = ownerobject(c);
/ `6 d( j, |2 s3 w; o; b1 xtreenode source=node("/source",model());
% E! u: _0 Q: t o2 G8 R" u0 [int port = parval(2);
! I+ O, t' |9 S# m( W- _if(" E6 N4 l2 z$ e4 Z. B
content(current)<5! {; e8 J/ h, g2 `' h5 E$ B
)% V3 S# r- D/ L# {/ u: f$ P4 }7 l
sendmessage(source,current,2,0,0);' i; C1 B, m) P1 K
return 5;- Q8 N9 g! C& V
第三步:
2 S) W4 ^' w2 e- U( t& q! u8 N/ M& @" \
/**Custom Code*/0 |# p+ X$ y" y/ R# `! o& P+ k
treenode current = ownerobject(c);9 K' ?' a! K2 s$ p
unsingned int uservalue=(unsigned int) msgparam(1);
. q2 q. [) |! v& w5 |1 V& J0 qswitch(uservalue){
) q0 b$ e6 g5 ]% s. F. V Z case 1:closeoutput(current);break;
/ ^1 m J& u, } case 2 penoutput(current);break;
! q( ^2 \0 H5 ]9 l( ?- }6 r}+ R8 F7 w& ^. F* @, Z1 `
最后系统报错是第三步,说是没有定义uservalue:4 v- {: I/ T( F" z) P: D
' R2 ^6 h' U n9 \* \2 n6 f
line 3 unknown variable "unsingned"
5 D& X' p3 [: L2 W! Y+ M5 t# x- r8 b! ?5 u
line 3 syntax error, unexpected type identifier, expecting ';'( Y0 f5 u7 R: o. V* @. X, K6 ^/ N
Could not finish parsing because of previous errors.; p0 e" l- b6 ?) {
- Z0 A/ ~; r9 j2 S$ R) e请问各位大大这是怎么一回事.... |
|