Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

I need help with my code it's an if statement

So I have a question about my code I know this is not the right place it was the only place I could find can anyone help me plz I beg. It’s an if statement. It’s not on Code Combat but on Ozaria. Here is my code.


if avatars.setPlayerColor(“red”) == true: then ()'s avatars.setSpecialAbility(“ghost”)

It’s an if statement that checks to see if the avatar’s color is red then their special ability to ghost.

Hi, so two things first if you don’'t mind, one, what level in this? and two please format your code using the </> button

1 Like

I think true needs a capital T.
I haven’t done Ozaria, so there could be an issue with the rest of it (which I don’t recognize) but I know that in python True has a capital T.

1 Like

It’s on hungry hungry avatars.

1 Like

I tried it but it says Untermined string constant.

Oh wait, since it’s not on CoCo, you might not have to format it, Idk. I also dk if If should have it on #level-help. Now I’m confused.

It seems to me that avatars.setPlayerColor() is a function which sets the players color (I’m not being sarcastic), but it won’t return True or False. Is there any property like avatars.color ?

No. I don’t think there is a property like avatars.color.