Indention Error with Input Events

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Noob_Maker
:warning: Old Version Published before Godot 3 was released.

I’m doing the controls and It’s not really working and It might has to do with this error right here:

error(13,0): Unindent does not match any outer indentation level.
But I have no idea how to fix it. Here's the code by the way: extends KinematicBody2D const GRAVITY = 500.0 const WALK_SPEED = 200 var velocity = Vector2() func _fixed_process(delta): velocity.y += delta * GRAVITY if (Input.is_action_pressed ("Left")): velocity.x += -WALK_SPEED elif (Input.is_action_pressed("Right")): velocity.x -= WALK_SPEED else: velocity.x = 0 var motion = velocity * delta move( motion ) if (is_colliding()): var n = get_collision_normal() motion = n.slide(motion) velocity = n.slide(velocity) move(motion) func _ready(): set_fixed_process(true)
:bust_in_silhouette: Reply From: molamar

you´ll have to indent your code, check the Docs or take a look at a Python Tutorial, GDScript is doing this in the same way.

Thanks. It’s just that I didn’t done code with Python but rather Lua and HTML. Thanks though :slight_smile:

Noob_Maker | 2016-11-12 17:16

Edit :

and take into account that three times Space-key isnt the same like one time Tab-key

molamar | 2016-11-12 17:33