it gives an error in 1 line: extends Node2D , help pls!

Godot Version 4.3

Question

it gives an error in 1 line: extends Node2D , here is the code itself

extends Node2D

onready var item = preload(“res://Scenes/item.tscn”)

func _ready():
var items = [“apple”]
for i in range(16):
randomize()
var a = int(randi_range(0,4))
var new_item = item.instantiate()
$Items.add_child(new_item)
new_item.set_item(items[a])
new_item.position = Vector2(int(rand_range(0, 321)), int(rand_range(0, 321)))
pass

It’s @onready in 4.x, onready is 3.x

Also in the future make sure to surround your code with ``` to format it correctly, like so:

```
Code
```