Skip to content

Conversation

@SokolovskyiK
Copy link

@SokolovskyiK SokolovskyiK commented Apr 9, 2025

Summary

This PR adds a simple check to prevent confusion when users try to run valid JavaScript code like "for (let i = 0; i < 5; i++)" instead of SimpleScript syntax "for i = 1 to 5 do print(i) endfor" inside the SimpleScript editor.

What I added

  • A quick new Function(code) check inside runSimpleScript()
  • If the code is valid JS, it stops execution and shows:

    "HEY! Stop putting JS here, we are learning SimpleScript! Enter VALID SimpleScript code."

Why

There was an open issue (#1) where a user expected JS-style for loops to work. This prevents that mistake in a fun way 😄

Sorry for slightly diverging from the original task — I figured a small UX tweak like this might still be helpful for future users.

@vercel
Copy link

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
simple-script ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 7:08pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant