Skip to content

Error on disconnect if a player hasn't fully joined the table #12

Description

@Thirtybird

error in script (global) function : chunk_3: attempt to index a nil value

function onPlayerDisconnect(person)
    --pl (person)
    local color = string.lower(person.color)
    --pl (color)
    players[color].steam = ""
    players[color].active = false
    updatesUI("player"..color, {
      image = "ui_noplayer",
      color = players[color].color.."33",
      tooltip = "Player " .. color .. " inactive",
    })
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingheromodIssue affects the core of TTSHeroMod

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions