This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
–2 votes

I don't know what I did wrong so I need help.

my code is:

if isjumping
_velocity.y = jump
strength
snapvector = Vector3.ZERO
elif justlanded:
_snap
vector = Vector3.DOWN
velocity = moveandslidewithsnap(velocity, snapvector, Vector3.UP, true)

if _velocity.length() > 0.2:
    var look_direction = Vector2(_velocity.z, _velocity.x)

func process(delta: float) -> void:
springarm.translation = translation

in Engine by (10 points)

What error are you getting?

I figuered out how to solve this, but I have another issue where it says error parsing expression, misplaced: elif

Oh well the new error should be easy to solve. The error itself should tell you which line it is referring too. Your elif must not be valid in an if block, maybe it isnt tabbed in correctly or something similar.

Thank you it worked but now it says the same thing but for func

nvm I fixed that as well

Can you mark this question as answered?

1 Answer

0 votes

It seems you're struggling with simple syntax errors.

My solution would be to do 4-6 hours of python tutorials as it's the closest language to GD script. This should help you with your own troubleshooting in the future. I would say you're having issues keeping track of indents which is very common when starting out with any language (Especially C languages)

by (160 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.