I have a python function which calls CyPlot.getBestDefender() and it's giving me a python exception. First I tried to call it like this:
but the exception said that NO_PLAYER and NULL were not defined. So I tried changing them to -1 and 0 and now it's giving me another exception saying that I'm trying to pass an integer (0) when it should be a CyUnit object (as the third argument).
How do I pass a NULL CyUnit to this function???
Code:
pDefender = gc.getPlayer(pDestPlot.getBestDefender(NO_PLAYER, pSelectionGroup.getOwner(), NULL, True).getOwner())
but the exception said that NO_PLAYER and NULL were not defined. So I tried changing them to -1 and 0 and now it's giving me another exception saying that I'm trying to pass an integer (0) when it should be a CyUnit object (as the third argument).
How do I pass a NULL CyUnit to this function???