Skip to content

Commit

Permalink
Fix tournament create error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sesposito committed Oct 31, 2024
1 parent 0930eb8 commit 091068c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/runtime_go_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down
2 changes: 1 addition & 1 deletion server/runtime_javascript_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/runtime_lua_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 091068c

Please sign in to comment.