Hyy guys I am learning godot, I was watching an tutorial on YouTube he was using godot 3
And I am using godot 4.2 stable.
Is used code in my scene, and then run my project but it's not running, getting stuck on logo of godot, even not getting any error 🥲
After removing script it's working fine.
This is script
@onready var card = preload("res://card.tscn")
func _ready():
create_vboxes()
func create_vboxes():
var x = $VBoxContainer/PanelContainer/ScrollContainer/VBoxContainer/HBoxContainer.rect_size.x
var number_of_vbox = int(x / 190)
var hbox = $VBoxContainer/PanelContainer/ScrollContainer/VBoxContainer/HBoxContainer
for c in hbox.get_children():
c.queue_free()
for n in range(number_of_vbox):
var vbox = VBoxContainer.new()
hbox.add_child(vbox)
var card_new = card.instance()
vbox.add_child(card_new)
func _on_resized():
create_vboxes()