I’m not able to declare a variable with walrus operator.
This is what I write, from the hints menu;
enemy1 := “Kratt”
Which immediately gives me the following error;
If you want to call enemy1 as a function, you need ( )'s.`
This won’t run. I don’t understand.
you have a semicolon in front of your equals sign. Delete that and you should be fine Welcom to the discourse!
@Alex_George welcome to CodeCombat Discourse! As @JoPro_8000 said, you don’t need the :, delete that. Aside from that, you don’t have a problem with that line.
Well yeah but it was copy-pasted from the hints menu. I don’t understand why the walrus operator doesn’t work.
Can you show me how to declare this variable with walrus?
It was part of the hints menu. I copy-pasted from the official game hints menu. Can you show me how the walrus operator should be used in this case?
What do you mean by the walrus operator? Are you sure the hints were in Python?
Yes, that’s the level hint screen and it doesn’t work!!
Because I’d like to learn walrus to see how it works. Learning process.
You’re not supposed to put :
I’m just following the hints. Is this a bad hint?
This picture has what you need to complete the level. For walrus operator you might need to do .
That doesn’t work either.
It’s not my computer. I’m on Windows with latest version of Firefox and it does the same thing, as well as on my Chromebook Go.