You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
When running in Autoplay using the autoplay mod, there are references to the LocalPlayer which will sometimes return -1 and thus nil in certain functions. I have found two places in this mods UnitFlagManager.lua and can be fixed like this:
In UnitFlag.SetColor (around lines 508) wrap the "War Check" with
if Game.GetLocalPlayer() > -1 then
-- War Check
[...]
end
and in OnPlayerTurnActivated (line 1464) after local idLocalPlayer = Game.GetLocalPlayer();
insert
if idLocalPlayer < 0 then
return
end
Edit:
also line 163 and 187 should be changed to if(CQUI_ShowPaths) and (Game.GetLocalPlayer() > -1) then
The text was updated successfully, but these errors were encountered:
Alright, thanks for sharing! If you'd like to be properly credited for this fix, then please use the "Fork" button near the top and use the web editor to commit the changes. Finally, use the "Pull Request" button to submit your proposed changes. If that seems like altogether too much work, that's fine too, but you won't show up in the Github contributor list and it will be harder to claim credit for helping with this project as a result
chaorace
changed the title
A few easy fixes to make it compatible with the autoplay mod
Autoplay mod compatibility
Apr 16, 2017
When running in Autoplay using the autoplay mod, there are references to the LocalPlayer which will sometimes return -1 and thus nil in certain functions. I have found two places in this mods UnitFlagManager.lua and can be fixed like this:
In UnitFlag.SetColor (around lines 508) wrap the "War Check" with
and in OnPlayerTurnActivated (line 1464) after
local idLocalPlayer = Game.GetLocalPlayer();
insert
Edit:
also line 163 and 187 should be changed to
if(CQUI_ShowPaths) and (Game.GetLocalPlayer() > -1) then
The text was updated successfully, but these errors were encountered: