From 091068c2fa20790b59023952bc096844ff29aa51 Mon Sep 17 00:00:00 2001 From: Simon Esposito Date: Thu, 31 Oct 2024 12:07:18 +0000 Subject: [PATCH] Fix tournament create error messages --- server/runtime_go_nakama.go | 2 +- server/runtime_javascript_nakama.go | 2 +- server/runtime_lua_nakama.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/runtime_go_nakama.go b/server/runtime_go_nakama.go index f6beadb5f..6adb9432a 100644 --- a/server/runtime_go_nakama.go +++ b/server/runtime_go_nakama.go @@ -2708,7 +2708,7 @@ func (n *RuntimeGoNakamaModule) TournamentCreate(ctx context.Context, id string, case "decr", "decrement": oper = LeaderboardOperatorDecrement default: - return errors.New("expects sort order to be 'best', 'set', 'incr' or 'decr'") + return errors.New("expects operator to be 'best', 'set', 'incr' or 'decr'") } if resetSchedule != "" { diff --git a/server/runtime_javascript_nakama.go b/server/runtime_javascript_nakama.go index 8b0f0a174..37ac7ed22 100644 --- a/server/runtime_javascript_nakama.go +++ b/server/runtime_javascript_nakama.go @@ -6221,7 +6221,7 @@ func (n *runtimeJavascriptNakamaModule) tournamentCreate(r *goja.Runtime) func(g case "decr", "decrement": operatorNumber = LeaderboardOperatorDecrement default: - panic(r.NewTypeError("expects sort order to be 'best', 'set', 'decr' or 'incr'")) + panic(r.NewTypeError("expects operator to be 'best', 'set', 'decr' or 'incr'")) } var duration int diff --git a/server/runtime_lua_nakama.go b/server/runtime_lua_nakama.go index 3ed26b8bd..2344087f4 100644 --- a/server/runtime_lua_nakama.go +++ b/server/runtime_lua_nakama.go @@ -7890,7 +7890,7 @@ func (n *RuntimeLuaNakamaModule) tournamentCreate(l *lua.LState) int { case "decr", "decrement": operatorNumber = LeaderboardOperatorDecrement default: - l.ArgError(4, "expects sort order to be 'best', 'set', 'decr' or 'incr'") + l.ArgError(4, "expects operator to be 'best', 'set', 'decr' or 'incr'") return 0 }