Closed towerofnix closed 9 years ago
The mouth of a C block has to be a list, not a Script
.
(Scripts are just lists of blocks together with a position; and you can't position the contents of a C block mouth independently of the parent script!)
In [4]: s.parse("""
when green flag clicked
forever
if (key right arrow pressed?) then
show
end
end
""")
In [6]: s.scripts[0]
Out[6]:
kurt.Script([
kurt.Block('whenGreenFlag'),
kurt.Block('doForever', [
kurt.Block('doIf',
kurt.Block('keyPressed:', 'right arrow'),
[
kurt.Block('show'),
]),
])])
Hope that helps :)
Ahh okay. Thanks! :)
I get this error..
.. when running this code:
It seems to be that the error is in the script section. Any idea what this is?
I'm on Mac OS X 10.10 (Yosemite) running Python 2.7.8.