+ 2
A very weird error on my project
So, I was coding a rock paper scissors game, then when I test it, it says there is an error "maximum call stack size exceeded" the console says, if you know the fix and WHY this error even exists, please leave a comment! https://code.sololearn.com/W23U9Uan2saE/?ref=app
5 odpowiedzi
+ 3
Line 13: please rename your function prompt to myprompt( or as you want)
Otherwise in line 14 you call it what leads to an infinite recursive call.
+ 5
your myprompt() function is working by itself, i.e. it takes the user input value and stores it, you didn't detailed what to do with this data later, you could have included your rest of the block code on it.
+ 2
Oma Falk Thank you! It worked.
Never thought a function name could summon such error.
+ 1
Emerson Prado Félix Zamdamela now I understand, the problem occurs because the compiler doesn't know what function to execute, the prompt function I made, or the prompt function that is built in, thank you!
0
RayZ All names should be unique in their scope