|
5仿真币
我用的emplant7.0版本,教程中有个生产桌子的例子。" i% h; o) ?! q( b5 g+ h1 e
mus中设置tabletop的custom attribute :8 M9 ]. l6 U1 ?1 R2 {# F' e# o! E
name为quality,value为good
& C# s1 `; \' [# L. w- ~& i% \有个reworkd 的method如下:
& u, ~" [* q9 C( |5 g) c, Fis
+ B7 O/ Q# P, _- [: N' Tdo
" C- o0 o0 b% ?: d$ c6 Y$ A count:=count+1;
# i9 v) R0 _6 C$ y8 ? print count;
2 ^- i. i. T. ^$ R1 @ if count=10
8 t3 b8 j4 g/ l: o2 { then @.quality:="bad";
% z/ X7 C6 a; t$ {) z count=0;
, d' O) k2 t/ E5 g else @.quality:="good";: E# n: W) F% f& B& I
end;
' f* [) s4 l1 O" G' t print @.quality;1 Z( c" m4 B: q, H8 \
@.move;
+ o/ O) ^( d% Hend;
+ D* ?' g9 M- ?) f- U程序总是在else @.quality:="good";处出错。并且此时可以看到@=.mus.tabletop:2。请教大家,帮忙看看 |
最佳答案
查看完整内容
那应该就没什么问题,是不是没有物件没有定义“quality”属性,你确认一下,出错的物件是不是定义好了
这个属性,另外看看你的标点有没有错!再不行就把你出错的提示 发一下!
|