Oct-31-2019, 08:34 PM
Caught another.....
The live lines(which I typed manually) are OK.
def CheckNearerOpponent(EntityName): me=Bladex.GetEntity(EntityName) x,y,z = me.Position for i in Bladex.GetEntitiesAt(x,y,z,2200): ent=Bladex.GetEntity(i) if ent and ent.Person: if ent.Life>0: if CheckIfEnemy(ent.Name): if ent.ActiveEnemy and ent.ActiveEnemy==EntityName: me.Data.SwitchOpponent(EntityName, ent.Name) return 1 #me.Data.SwitchOpponent(EntityName, ent.Name) #return 1 return 0In the above function the commented lines cause an error.
The live lines(which I typed manually) are OK.
Traceback (innermost last): File "Cfg.py", line 98, in ? execfile("DefFuncs.py") File "DefFuncs.py", line 21, in ? import EnemyNPCTypes File "..\..\Maps\DwarfWarsII\NUFiles\EnemyNPCTypes.py", line 332 me.Data.SwitchOpponent(EntityName, ent.Name) ^ SyntaxError: invalid syntax** I'll try a different editor.