Unexpected “Identifier” in class body error when using "export (int) var..." in Godot 4.1.1

Hi!
I´m new in Godot and I was watch a series of videos about create my first a 2d game.
More exactly this video:

In the minute 20:11, the youtuber creates a variable, but when I write the same in my script an error ocurred:

  • Unexpected “Identifier” in class body.

He uses a Godot version from 2018 and I can´t continue, please help.
Thanks!

can you send ur code

Sure!

extends Area2D

var Velocidad = 400 #velocidad de personaje
var Movimiento = Vector2 () #como se mueve
var limite #limite en la pantalla
signal golpe
func _ready():
hide() #esconder al personaje cuando inicie el juego
limite = get_viewport_rect().size #tamaño de la pantalla

func _process(delta):#proceso cada segundo en el juego
Movimiento = Vector2() #reiniciar el valor

if Input.is_action_pressed("ui_right"):
	Movimiento.x +=1
if Input.is_action_pressed("ui_left"):
	Movimiento.x -=1
if Input.is_action_pressed("ui_down"):
	Movimiento.y +=1
if Input.is_action_pressed("ui_up"):
	Movimiento.y -=1

if Movimiento.length() > 0: #verificar si se esta moviendo,eliminar=+rapido
	Movimiento=Movimiento.normalized() * Velocidad #normalizar velocidad
	
position += Movimiento * delta #actualizar los movimientos 
position.x = clamp(position.x, 0, limite.x) #atrapar, poner un limite en x 
position.y = clamp(position.y, 0, limite.y) #poner un limite en y, pantalla


if Movimiento.x !=0: #si el movimiento no es 0
	$sprite_jugador.animation = "derecha" #insertar el nombre de la animacion 
	$sprite_jugador.flip_h = Movimiento.x < 0 #si menor que cero se activa true
	#$sprite_jugador.flip_v = false 
elif Movimiento.y !=0: #si no es 0
	$sprite_jugador.animation = "arriba" #signo de dinero para llamar nodo
	$sprite_jugador.flip_v = Movimiento.y > 0 
else: #si no esta pasando cambiar al frente 
	$sprite_jugador.animation = "abajo"

func _on_body_entered(body): #cuando haya colision con un cuerpo
hide()
emit_signal(“golpe”)
$CollisionShape2D.disabled = true #desactivar la colision

func inicio(pos):
position = pos
show() #mostrar el personaje
$CollisionShape2D.disabled = false;

ROCA “scene”

extends RigidBody2D

export (int) var velocidad min
export (int) var velocidad max

@export var velocidad min
@export var velocidad max
try it

Don´t wowrk :frowning: