Calling functions from functions
Hi All,
I tried to articulate this in an earlier post but failed miserably!
It seems that the way the Makecode python environment is architected, it is extremely hard to do a simple thing...call functions from other functions. Normal python - couldn't be easier. Makecode seems to constrain you to this weird 3 number parameter thing. What is that all about? This makes it very hard to create well structured code through abstraction.
Here is an example from the docs. It calls a function from another function through a chat command, but parameter passing is restricted to 3 params and they all have to be numbers...is there any way around this?
-
Hi, Peter. I appreciate your perseverance on this! Just to clarify before I go attack some coding, is it necessary that the function be accessed from a chat command?
0 -
Hi Debbie,
No it isn't. It just more about calling functions from functions. Its seems that we always have this three "num" parameter constraint.
Actually - I'm not too concerned about this one - more about my next post which you may have seen - placing stair blocks upside down using python code.
Thanks for your reply.
0 -
Hi Debbie,
I worked out the rotational block thing. It appears you use the data property
0
Please sign in to leave a comment.
Comments
3 comments