|
|
5仿真币
在eM-Plant中,新加入一个Method,里面的编程如下:
1 w$ Z6 u, l kis
" i0 M+ X$ a/ |4 @2 M. H. o: Bdo
: N3 n) r2 x! _6 A: S Counter := counter +1;
0 w% V: t' Y- V3 f8 W+ z! I* b print counter;% D/ L" d! U; w! ? {# u8 e! J' l
if counter = 10& A+ T3 G6 V$ v! e$ f! H( w: @) t! o
then @.quality := "bad";' v, E2 |0 g2 L6 H' z# M3 j
counter :=0;2 g" ]" e6 [8 ^
else @.quality :="good"; 2 }: P% e, D5 n* t0 K
end;" ~* I; j( l! ?5 k. Y
Print @.quality;0 y9 j& g, y* h, Q: d0 ~
@.move;
# t6 I1 c8 N% o7 F; K# l& [+ Zend;7 D0 V$ S/ o/ t9 G3 W" o7 x H! R
" o* J) Y4 K) t# [0 @$ C9 O; p G- i0 U7 I* i; k* @; L
然后就出现了一下的错误:# x0 i" O, n6 A- f
Error in method '.Models.Frame_5.rework' in line 8: A 'VOID' cannot accept the method 'quality'.; H, Z/ U9 H4 Y$ F
/ y" B# Z4 O) j. f* ~. t
本人是个新手,想也想不明白,望那位仁兄能解答一下,谢谢! |
最佳答案
查看完整内容
右键单击你的entity(来源的那个),在最后一个选项卡里(Custom Attributes)添加一个quality,属性由你设置。
|