Hello Godoters,
I have been creating a text game by following the tutorials on youtube(here is the link https://www.youtube.com/watch?v=5gP1eOtR5Kg&t=1205s ) and I came to the point where I have to save the reusable scene by adding it to the GDScript here is the code:
extends Control
const InputResponse = preload("res://InputResponse.tscn")
onready var history_rows = $Background/MarginContainer/Rows/GameInfo/HistoryRows
func onInputtextentered(newtext: String) -> void:
var inputresponse = InputResponse.instance()
historyrows.addchild(input_response)
The problem is whenever I launch the game,the debugger pops up with the error message: attempt to call function ‘add_child ’ in base ‘null instance ’ on a null instance.