Repro
tmp=$(mktemp -d /tmp/goboscript-cloud-sprite-XXXXXX)
printf 'costumes "blank.svg";\n\n' > "$tmp/stage.gs"
printf 'costumes "blank.svg";\n\ncloud score;\n\nonflag {\n score = 1;\n}\n' > "$tmp/main.gs"
printf '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>\n' > "$tmp/blank.svg"
cargo run --quiet -- build "$tmp"
python3 - <<'PY' "$tmp/$(basename "$tmp").sb3"
import json, sys, zipfile
with zipfile.ZipFile(sys.argv[1]) as z:
p=json.loads(z.read('project.json'))
for t in p['targets']:
print(t['name'], t['isStage'], t['variables'])
PY
Observed:
Stage True {}
main False {'score': ['☁ score', 0, True]}
A cloud declaration inside a sprite emits the cloud variable on that sprite target.
Expected
Cloud variables should be rejected outside the stage/global scope, or normalized to a stage/global variable. Scratch cloud variables are project-global and should not be sprite-local.
Repro
Observed:
A
clouddeclaration inside a sprite emits the cloud variable on that sprite target.Expected
Cloud variables should be rejected outside the stage/global scope, or normalized to a stage/global variable. Scratch cloud variables are project-global and should not be sprite-local.