下载 App
引擎内部的代码报错。 LobbyManager的游戏开始通知报错
修改于10/1912 浏览BUG反馈
请修复游戏中的以下错误。请定位根因并修改代码,完成后验证游戏不再报错。
TapTap Maker - Error Report
Generated: 2026-10-19 05:16:56.791
Version: a7d51636 (HEAD@3763ea44)
Error Count: 1 total, 1 unique
Generated: 2026-10-19 05:16:56.791
Version: a7d51636 (HEAD@3763ea44)
Error Count: 1 total, 1 unique
[2026-10-19 05:16:48.479] [ERROR] Execute Lua function failed: [string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:769: attempt to index a nil value (field 'Success')
stack traceback:
[string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:769: in method '_handleGameStartNotification'
[string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:369: in function <[string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:368>
stack traceback:
[string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:769: in method '_handleGameStartNotification'
[string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:369: in function <[string "urhox-libs/GameLobby/HostSandbox/LobbyManager..."]:368>
--- 处理游戏开始通知
function LobbyManager:_handleGameStartNotification(eventData)
local success = eventData["Success"]:GetBool()
local errorCode = eventData["ErrorCode"]:GetInt()
local serverIP = eventData["ServerIP"]:GetString()
local serverPort = eventData["ServerPort"]:GetInt()
local authKey = eventData["AuthKey"]:GetString()
local sessionId = eventData["SessionId"]:GetInt64()
local mapName = eventData["MapName"]:GetString()
if success then
self.gameServerInfo = {
ip = serverIP,
port = serverPort,
authKey = authKey,
sessionId = sessionId,
mapName = mapName,
}
self.isMatching = false
LogDebug(string.format("Game server ready: %s:%d, session=%d",
serverIP, serverPort, sessionId), self.config.debugMode)
if self.onMatchFound then
self.onMatchFound(self.gameServerInfo)
end
if self.onGameStarted then
self.onGameStarted(self.gameServerInfo)
end
else
LogError("Game start notification failed: " .. errorCode)
if self.onError then
self.onError("GAME_START", errorCode)
end
end
end












