export (int) var speed = 200, Строка 3:Unexpected "Identifier" in class body.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Killua

extends CharacterBody2D

export (int) var speed = 200

var velocity = Vector2()

func get_input():
velocity = Vector2()
if Input.is_action_pressed(“right”):
velocity.x += 1
if Input.is_action_pressed(“left”):
velocity.x -= 1
if Input.is_action_pressed(“down”):
velocity.y += 1
if Input.is_action_pressed(“up”):
velocity.y -= 1
velocity = velocity.normalized() * speed

func _physics_process(delta):
get_input()
velocity = move_and_slide(velocity)

код, ничего не работает, персонаж не двигается, что делать?
Я новичок, вот решил освоить движок, до этого пять лет сидел на construct 2.

:bust_in_silhouette: Reply From: jgodfrey

This…

export (int) var speed = 200

… should be …

@export var speed: int = 200