Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Phantom Errors
#9
Caught another.....

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 0
In 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. Smile
Reply


Messages In This Thread
Phantom Errors - by prospero - Oct-29-2019, 12:59 AM
RE: Phantom Errors - by buran - Oct-29-2019, 02:18 AM
RE: Phantom Errors - by prospero - Oct-29-2019, 04:02 AM
RE: Phantom Errors - by buran - Oct-29-2019, 04:50 AM
RE: Phantom Errors - by prospero - Oct-29-2019, 05:20 PM
RE: Phantom Errors - by prospero - Oct-30-2019, 05:16 PM
RE: Phantom Errors - by snippsat - Oct-30-2019, 05:42 PM
RE: Phantom Errors - by nilamo - Oct-30-2019, 06:55 PM
RE: Phantom Errors - by prospero - Oct-31-2019, 08:34 PM
RE: Phantom Errors - by ichabod801 - Oct-31-2019, 08:44 PM
RE: Phantom Errors - by prospero - Oct-31-2019, 09:40 PM
RE: Phantom Errors - by ichabod801 - Oct-31-2019, 10:01 PM
RE: Phantom Errors - by prospero - Oct-31-2019, 11:59 PM
RE: Phantom Errors - by prospero - Nov-01-2019, 02:27 AM
RE: Phantom Errors - by nilamo - Nov-01-2019, 03:24 PM
RE: Phantom Errors - by prospero - Nov-02-2019, 02:23 AM
RE: Phantom Errors - by newbieAuggie2019 - Nov-02-2019, 03:18 AM
RE: Phantom Errors - by prospero - Nov-02-2019, 05:32 PM
RE: Phantom Errors - by prospero - Nov-02-2019, 06:42 PM
RE: Phantom Errors - by ichabod801 - Nov-02-2019, 09:40 PM
RE: Phantom Errors - by prospero - Nov-03-2019, 03:28 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Attibute Error: Two methods in a class, one I can reach, the other not (phantom file? GaryKuipers 4 3,247 Aug-28-2018, 02:32 PM
Last Post: GaryKuipers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020