Pass a string as a parameter into a on_chat event block.
As a teacher I want my students to be able to understand how variables can store different types. Two basic types are strings and numeric data types. However, at the moment only numeric data types can be passed as an argument to the on_chat event block. All of my teaching python books that I use as reference rely heavily on the print function and user input. But as it stands, I cannot parse the users input in an on_chat callback if it is a string, or any other class other than a number. There are so many reasons this could useful for teaching.
This is my feature request follow up to my tech support question here:
Here is a link to sample code: https://makecode.com/_i4ePE6HcE44v
I created an event block and tried to pass a string argument and found that any time I tried to call player.say(..) in my event block it printed the number 0 instead of the string argument.
I suggest to fix this that the parser code for the chat box be modified to detect quotes similar to how powershell, terminal and command prompt work. That way the user can pass a string argument into a chat command event block. This is causing a bad experience for a lot of my students on Outschool.
Please sign in to leave a comment.
Comments
0 comments