Create New Block into s2e extension File


#1

i use mblock v3.4.11 for arduino uno
Please I need Help , i cannot create block that return value from s2e extension File , all time block return 0
i know that block type ® is reading block.
this is my s2e file please correct
[“r”, “get Color R %n G %n B %n”,"",255,255,255,
{
“encode”:"{d0}{d1}{d2}",
“setup”:"",
“inc”:"",
“def”:"–separator–int getColor(int red , int green , int blue){ \n
int res =22;\n
if (red < blue && red < green && red < 25) {\n
if(green - blue >= 10 && green - blue <= 25 && green - ( 2 * red ) >= 8 )\n
res=1;\n
else if(green - red <= 10 && green - red >= -3 && blue >= green)\n
res=4; \n
else if(blue - red >= 3 && blue - red <= 10 && green - ( 2 * red ) <= 5)\n
res=6;\n
else if (green - blue >= -5 && green - blue <= 5 && green - ( 2 * red ) <= 5 )\n
res =5; }\n
else if (green < red && green < blue && green < 25)\n
res=2;\n
else if ((red > green && blue < green) && blue < 25 && red > 40)\n
res =3;\n
else if (red - (2 * blue) >= -2 && red - (2 * blue) <= 5 && green - red < 10)\n
res =7;\n
else if (blue < red && blue < green && (blue && red && green) < 25)\n
if (red - green <= 5 && red - green >= 0 && ((green - blue) || (red - blue)) < 5 && blue < 50)\n
res= 8;\n
return res; }\n",
“work”:“getColor({0},{1},{2})”,
“loop”:""
}
],