Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Phantom Errors
#1
Can anyone see anything wrong with the syntax in this code?

	def CheckClearInv(self, EntityName):
	   me=Bladex.GetEntity(EntityName)
	   inv = me.GetInventory()
	   for id in range(inv.nObjects):
	      for ob in Actions.GetListOfObjectsAt(inv,id):
	      try:
	         ent = Bladex.GetEntity(ob)
	            if ent.Kind in ("Pocima100", "Pocima200", "PocimaTodo"):
	               Actions.RemoveFromInventory (me, ent, "")
	               print "Stuck potion removed"
		  except:                 # this is line 1164 in the file
		     pass
There isn't. Big Grin It works perfectly well in a game level and has done for years.

I have used UltraEdit for about 20 years. Recently I got a new PC and upgraded to the latest version.

I copied that code into another game map and now it gives this error.....

  File "..\..\Maps\DwarfWarsII\NUFiles\AllyNPCTypes.py", line 1164
    except:
         ^
SyntaxError: invalid syntax
This is totally baffling me. Huh I make enough real errors with getting phantom ones.
This isn't the first time it has happened. NEVER with the old version of UltraEdit.

Not really asking for magic answers, but has anyone encountered this weird phenomenon???
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