guards in place for when scoreboard_host.txt is not present

This commit is contained in:
Haze Weathers 2024-12-03 16:08:33 -05:00
parent 6a68e025ea
commit 94ed6c6c68
3 changed files with 11 additions and 5 deletions

View file

@ -35,9 +35,10 @@ class ScoreEntry:
func _ready() -> void:
var file = File.new()
file.open("res://scoreboard_host.txt", File.READ)
server_host = file.get_line()
file.close()
var result = file.open("res://scoreboard_host.txt", File.READ)
if result == OK:
server_host = file.get_line()
file.close()
http = HTTPRequest.new()
http.download_chunk_size = 4096