Ask coding questions

← Back to all posts
Why is this happening? ;w;
StevenDavis2 (36)

There is a weird floating error in my code. It is not assigned to anything, and moves along whenever I add spaces or lines. I cannot delete it and it crashes my entire code. It also makes any new colons be syntax errors. What should I do? I can delete my entire code and it is still there... I am doing this in python and ABSOLUTELY NOTHING I do will make it go away!! @DartZII

Answered by Dart (1187) [earned 5 cycles]
View Answer
Comments
hotnewtop
StevenDavis2 (36)

Here. It will move wherever. It can be manipulated and moved anywhere, but not deleted. It will resist everything and it crashes the entire program.

Dart (1187)

@StevenDavis2 ah, you’re writing your if statements incorrectly, if() is for js in python you do

if a == b:
    code
else:
    code
StevenDavis2 (36)

@DartZII ??? I have always used parentheses in python, and it has always worked. Also, the program has only if/then statements with parentheses and it worked with every other test up until this error randomly occurred. This error popped up randomly, and the other versions of my code with almost identical code worked. Although python is only a language I am starting to learn, and although this may be the problem, is there anything else that you think could be the problem? (Sorry for talking SO much, I talk way too much)

Dart (1187)

@StevenDavis2
1. It’s fine I understand
2. Please run the code and provide the error
3. It is improper practice to write python code like that, it’s just incorrect syntax

StevenDavis2 (36)

@DartZII Thank you! I look back and realize that when I read about conditionals that you DON'T use parentheses. I am going to try to fix every loop and see if that fixes it, I will then get back to you to tell you if that worked. Thank you so much! ^w^

StevenDavis2 (36)

@DartZII So........... ;<.< I fixed all of the if/then conditionals, and it did not fix the error... I can give you the error here:

Dart (1187)

@StevenDavis2 in line 40 you did int(input() you forgot a parenthesis
It should be int(input(“string”)) (forgot closing parenthesis)

StevenDavis2 (36)

@DartZII YES! It works now. Thank you so much!! ^W^

(By the way, did you look at my most recent suggestion? I included starter graphics for the Ideas that I created)

Dart (1187)

@StevenDavis2 aaaa no I’ll go check it out rn, and I’m happy I helped!

StevenDavis2 (36)

@DartZII Okay! (I have a LOT of animation in my Piskel, and I really enjoy creating animation and sprites! If you ever need something for a project or anything else, just ask! I would love to do it!(It is kind of the same thing you posted, just for bitmap animation.)

StevenDavis2 (36)

It can also be made as big as you want, and as small as one space. It is odd.

StevenDavis2 (36)

@DartZII (Sorry, I ALWAYS forget to do this) >.<;

Dart (1187)

Can you show me the error and the code?