![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | GM12 |
Hello Godoters,
I have just started making a text game.I’m learning from one guy on youtube (here is the link https://www.youtube.com/watch?v=5gP1eOtR5Kg) and here is the code:
extends Control
const InputResponse = preload(“res://InputResponse.tscn”)
onready var history_rows = $“Background/MarginContainer/Rows/GameInfo/ScrollContainer/HistoryRow”
func _on_Input_text_entered(new_text: String) → void:
var input_response = InputResponse.instance()
history_rows.add_child(input_response)
I came to the point where I have to add a scroll bar into my game.
I have followed all his instructions but it doesn’t work.The engine keeps showing attempt to call function error ‘add_child’ in base ‘null instance’ on null instance.