I can't seem to get "game.players" fixed.
I have two places I'm using this and can't get it to work in 0.13:
Case1:
Code: Select all
if event.tick % update_com_count == 0 then
for index, player in ipairs(game.players) do
if player.connected and player.character then
UpdateUnitsCommands(index)
end
end
end
Code: Select all
if event.tick % update_com_count == 0 then
for index, player in ipairs(game.players[event.player_index]) do
if player.connected and player.character then
UpdateUnitsCommands(index)
end
end
end
Code: Select all
function writeDebug(message)
if NE_Buildings_Config.QCCode then
for i, player in ipairs(game.players) do
player.print(tostring(message))
end
end
end
Code: Select all
function writeDebug(message)
if NE_Buildings_Config.QCCode then
for i, player in ipairs(game.players[1]) do
player.print(tostring(message))
end
end
end