Unverified Commit a0e01301 authored by Simon Esposito's avatar Simon Esposito Committed by GitHub
Browse files

Return rank in lua tournament_records_haystack fn (#472)

* Update changelog
Fixes #469
parent 94611911
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ All notable changes to this project are documented below.
The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]

### Fixed
- Add missing 'rank' field from the Lua runtime `tournament_records_haystack` function results.

## [2.14.0] - 2020-10-03
### Added
+2 −1
Original line number Diff line number Diff line
@@ -5999,7 +5999,7 @@ func (n *RuntimeLuaNakamaModule) tournamentRecordsHaystack(l *lua.LState) int {

	recordsTable := l.CreateTable(len(records), 0)
	for i, record := range records {
		recordTable := l.CreateTable(0, 10)
		recordTable := l.CreateTable(0, 11)

		recordTable.RawSetString("leaderboard_id", lua.LString(record.LeaderboardId))
		recordTable.RawSetString("owner_id", lua.LString(record.OwnerId))
@@ -6028,6 +6028,7 @@ func (n *RuntimeLuaNakamaModule) tournamentRecordsHaystack(l *lua.LState) int {
		} else {
			recordTable.RawSetString("expiry_time", lua.LNil)
		}
		recordTable.RawSetString("rank", lua.LNumber(record.Rank))

		recordsTable.RawSetInt(i+1, recordTable)
	}