Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲Assigning a random list item to another list item leads to a cryptic error #5758

Closed
AnneliesVlaar opened this issue Sep 8, 2024 · 2 comments · Fixed by #5873
Closed
Assignees
Labels
bug Something isn't working

Comments

@AnneliesVlaar
Copy link
Contributor

Describe the bug
When I use the random function from a list and I want to assign the result to a item of another list, I get the error message 'We detected that a new line is being used on line 12 which is not allowed. Can you try looking for a missing or an extra character on your code?'. It does work when I assign the random choice to a variable and assign the variable to the item of the list.

Paste the Hedy code & level
level 17

kassa_munten = [1,1,1,1,1,1]
random_aantal_muntjes = [1,2,3,4,5]
kassa_munten[1] = random_aantal_muntjes[random]

Add a screenshot (optional)
afbeelding

What machine and browser you were using (optional)
If the issue concerns things in the website, let us know:

  • What computer you are using (Windows, Mac, Linux?)
  • What browser you were using Mozzila
@AnneliesVlaar AnneliesVlaar added the bug Something isn't working label Sep 8, 2024
@MarleenGilsing
Copy link
Collaborator

I found that the same error message is shown when you use the add command without specifying which list you want to add the new item to. This should be fixed too.

@boryanagoncharenko boryanagoncharenko self-assigned this Oct 1, 2024
@boryanagoncharenko
Copy link
Collaborator

I found that the same error message is shown when you use the add command without specifying which list you want to add the new item to. This should be fixed too.

I created a separate issue: #5871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants