[CF-Devel] Weird Python behaviour

Mark Wedel mwedel at sonic.net
Sat Sep 21 23:45:07 CDT 2002


Todd Mitchell wrote:
>
     
      I have noticed some weird occurances involving items created using the
     
     >
     
      CFPython.CreateObject() function
     
     >
     
      First thing it does not use the name of the arch to create an arch, but uses
     
     >
     
      the name flag in the arch (e.g. you have to use 'strange key' instead of
     
     >
     
      'key2').  This is somewhat of a problem in my way of thinking since it is
     
     >
     
      confusing.
     
     
  It also poses potential problems in that there are archetypes that have the 
same object name.  arch names are guaranteed to be unique.

>
     
     
     >
     
                           id = CFPython.CreateObject('strange key', (x, y))
     
     >
     
                           CFPython.SetName(id, 'Key Lot %s' %(v[0]))
     
     >
     
                           CFPython.SetMessage(id, 'This is the key to a %s
     
     >
     
      located on registered lot #%s' %(v[2],v[0]))
     
     >
     
                           #CFPython.SetSlaying(id, 'Key Lot %s' %(v[0]))
     
     
  Make sure you put a \n at the end of the message you set.  Arguably, the 
plugin should do this for you if you don't, but it doesn't.




    
    


More information about the crossfire mailing list