(RESOLVED) "game.players" help please
Posted: Tue Jun 28, 2016 3:49 am
Hi,
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:
I thought the fix was below, but that did not work.
Case 2:
Tried above variations and below, no luck:
Thanks for any assistance.
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