In mBlock 5 any variable is created as a double (can hold float or integer)
generates
double aString;
In mBlock 3 the initialization could be used to cause the block-parser to insert a String instead. for example
generates
String aString;
While auto-type recognition is nice, as a mBlock My Block requires selection of parameter type, selection of variable type would be acceptable
Workaround (not for beginners)
Create blocks code with variables. BEFORE uploading, click on the </> in upper right to show the Arduino generated code, select all and copy, close the tab. Then above the code window, select Arduino C instead of Blocks, and paste. Then find your variable definitions, and for the Strings etc replace double with the correct type. Then upload to robot and it works correctly.