[CF-Devel] Weird Python behaviour

Todd Mitchell temitchell at sympatico.ca
Sat Sep 21 18:24:06 CDT 2002


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.
Secondly and more importantly - items created tend to screw up the maps and
player files (large patches of the file are messed up from the point the
item was located - also the item, if it survives sometimes this adds the
missing code to it's message field.) they are sitting in.  I noticed this as
more of my maps were getting buggered up as I tested my script.
Granted this could be my script, but the items are created properly and are
functional for a while - then seem to mess things up when I leave the game.

            if (CFPython.PayAmount(activator, price*50)):
                     message = 'Excellent choice. Here is the key to your
new %s' %(v[2])
                     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]))

I was hoping it was my script and not the CreateObject since this is used in
the IPO scripts as well and thus could be causing problems for others.
I don't think has to do with the SetSlaying() since things were getting
messed before I added that bit in.

-tm


    
    


More information about the crossfire mailing list