Oct-29-2019, 12:59 AM
Can anyone see anything wrong with the syntax in this code?
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.....
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???
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 passThere isn't.

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 syntaxThis is totally baffling me.

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???