Code: Select all
local belgium = game:GetFactionById(6)
local Brussels = game:GetHex(86, 26)
if Brussels.unit ~= nil
and unit.hex ~= nil
and unit.hex.x == 86
and unit.hex.y == 26
and unit.type == Unit.LAND
and hex.unit.faction.id == 6 then
unit.mp = 0
end Code: Select all
[00:40:32][4640]Phase start: central_powers
[00:40:32][4640]**************
[00:40:32][4640]**************
[00:40:32][4640]SIGINT PHASE
[00:40:32][4640]**************
[00:40:32][4640]**************
[00:40:32][4640]--------------------------------------/////////////////-------------------------------CP SIGINT PHASE
[00:40:32][4640]game/game_supply.lua:609(global SetUnitMovePenalty) game/game_supply.lua:609: attempt to index global 'hex' (a nil value)
[00:40:32][4640][C]:-1(method Start) std::exception: 'Lua Error:game/game_supply.lua:609(global SetUnitMovePenalty) game/game_supply.lua:609: attempt to index global 'hex' (a nil value)'
