diff --git a/addons/talo/plugin.cfg b/addons/talo/plugin.cfg index 9a4b3d1..82ab9bf 100644 --- a/addons/talo/plugin.cfg +++ b/addons/talo/plugin.cfg @@ -3,5 +3,5 @@ name="Talo Game Services" description="Talo (https://trytalo.com) is an open-source game backend with services designed to help you build games faster. You can currently:\n\n- Identify and authenticate players\n- Store persistent data across players\n- Track events (levelling up, finding loot, etc)\n- Display high scores with leaderboards\n- Store and load player saves\n- Load game config options and flags from the cloud\n- Get feedback directly from your players" author="trytalo" -version="0.7.0" +version="0.7.1" script="talo_autoload.gd" diff --git a/addons/talo/samples/leaderboards/scripts/leaderboard.gd b/addons/talo/samples/leaderboards/scripts/leaderboard.gd index c087c86..fced229 100644 --- a/addons/talo/samples/leaderboards/scripts/leaderboard.gd +++ b/addons/talo/samples/leaderboards/scripts/leaderboard.gd @@ -9,12 +9,14 @@ var entry_scene = preload("res://addons/talo/samples/leaderboards/entry.tscn") @onready var info_label: Label = %InfoLabel @onready var username: TextEdit = %Username +var _entries_error: bool + func _ready() -> void: leaderboard_name.text = leaderboard_name.text.replace("{leaderboard}", leaderboard_internal_name) await _load_entries() if entries_container.get_child_count() == 0: - info_label.text = "No entries yet!" + info_label.text = "No entries yet!" if not _entries_error else "Failed loading leaderboard %s. Does it exist?" % [leaderboard_internal_name] else: info_label.text = "%s entries" % entries_container.get_child_count() @@ -36,6 +38,11 @@ func _load_entries() -> void: while !done: var res = await Talo.leaderboards.get_entries(leaderboard_internal_name, page) + + if res.size() == 0: + _entries_error = true + return + var entries = res[0] var last_page = res[2]