Makeblock-official / mBlock

base on scratch offline v2.0 by MIT, Learn more from Makeblock official website
http://www.makeblock.com
GNU General Public License v2.0
320 stars 228 forks source link

Code Generation Error #27

Closed cmcknight closed 7 years ago

cmcknight commented 8 years ago

mBlock 3.2.2 is not correctly performing variable assignments during code generation. When I use a set [variable] to [value] block, strings are not being properly quoted resulting in errors being thrown during compilation. This issue may have existed prior to this version (just noticed the issue today).

To duplicate the error, set up an mBlock or Orion program block, create a single variable, and then attempt to assign a string value to it.

Further experimentation/investigation reveals that strings must be quoted in the assignment block to be properly translated. Oddly, this is not required in pure Scratch 2.0 and I did not notice any mention of this in the mBlock Kids Maker Rocks With the Robot booklet. This needs to be documented somewhere obvious because a native Scratcher (or someone who only knows Scratch) will struggle trying to make string assignments work.