heroiclabs / nakama-docs

Documentation for Nakama social and realtime server.

Home Page:https://heroiclabs.com/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong variable used in example

ChimpSay opened this issue · comments

In the Function Reference for tournaments.
When retrieving the list of tournaments, the for loop is using tournament.id but it is undeclared anywhere.

local category_start = 1
local category_end = 2
local start_time = 1538147711
local end_time = 0 -- All tournaments from the start time.
local limit = 100  -- Number to list per page.
local tournaments = nk.tournament_list(category_start, category_end, start_time, end_time, limit)
for i, row in ipairs(tournaments) do
  nk.logger_info("ID " .. tournament.id .. " - can enter? " .. row.can_enter)
end