Page 1 of 2

Where am I missing?

PostPosted: Wed Dec 30, 2009 1:41 am
by ametist
I don't know what to do now, have tried to get this to work but no luck :( so I would really appreciate if someone could look at my scripting and hopefully spot the error!
I have this object with a subworld that have an animation. I have created a SDLfile and a pythonfile for it. The animation runs fine by itself, but I can't trigger it. The logfile tells me there are no python or SDLfiles?

Here is part of my alscript:
Show Spoiler


Here is the pythonfile:
Show Spoiler


Here is the SDLfile:
Show Spoiler


Here is the logfile:
Show Spoiler


;)

Re: Where am I missing?

PostPosted: Wed Dec 30, 2009 2:28 am
by diafero
Did you remove the age state file from the "sav" directory?

Re: Where am I missing?

PostPosted: Wed Dec 30, 2009 2:45 am
by D'Lanor
The first thing to check is the agesdlhook in your Book text in Blender and make sure it is set to True.

Code: Select all
config:
    agesdlhook: True


Then make sure that you are using the latest version of Plasmashop. I already spotted one old Plasmashop bug in your Python file. class newcret2(ptResponder): should be class newcret2(ptResponder,): and I bet there are errors like that in the glue section as well.

Re: Where am I missing?

PostPosted: Wed Dec 30, 2009 4:19 am
by ametist
Thanks guys! Yes diafero I deleted the .sav file , that was something I learned early in this endeavour ;) , but it's always something to check!

The Book -text is allright, just checked.
D'Lanor, when you say new PlasmaShop, you mean version3 I guess? Because you're right I don't have that version! I'm on to that ASAP!!

Re: Where am I missing?

PostPosted: Thu Dec 31, 2009 3:58 am
by diafero
PlasmaShop 3 does not yet support Python files, so I bet he speaks about version 2.2.6 - see the Wiki

Re: Where am I missing?

PostPosted: Thu Dec 31, 2009 6:16 am
by D'Lanor
All I know is that Zrax fixed those tuple errors some time ago. I don't use PlasmaShop for Python.

You can fix it yourself by adding the comma I pointed out and then copy the glue section of a working Python file.

Re: Where am I missing?

PostPosted: Fri Jan 01, 2010 3:49 am
by Christian Walther
D'Lanor wrote:class newcret2(ptResponder): should be class newcret2(ptResponder,):

Can you explain this to someone who thought himself fluent in Python? Even when I try this in Python 2.2 (outside of Plasma), I see no difference at all between defining a class with or without a comma after the superclass. I'm not even sure there are any tuples involved here, the grammar just talks about an expression_list, and it seems to me that only free-standing expression_lists are turned into tuples, while the class syntax snatches the list before that. At least I can't define a class by passing an actual tuple (class B((A,)): pass).

I think you might be treating this as a "false positive" of the actual tuple bug where (some versions of?) decompyle wrongly outputted 1-tuples as (x) instead of (x,). But perhaps I'm wrong and would love to be enlightened.

Re: Where am I missing?

PostPosted: Fri Jan 01, 2010 5:23 am
by D'Lanor
That is just how it appears to be done in Cyan's files, or rather how the files are reconstructed by UruPython which has always worked flawlessly with Uru ABM/CC Python 2.2. So from a practical point of view my recommendation is simply: let's stick with whatever works.

Re: Where am I missing?

PostPosted: Fri Jan 01, 2010 6:47 am
by Christian Walther
OK, case closed. Source code with or without comma produces the same bytecode, and the comma is an artifact of the fixed decompyle that comes with UruPython:
Code: Select all
buia:~ cwalther$ mkdir comma nocomma
buia:~ cwalther$ cat > nocomma/test.py
class A: pass
class B(A): pass
thisisatuple = (3,)
buia:~ cwalther$ cat > comma/test.py
class A: pass
class B(A,): pass
thisisatuple = (3,)
buia:~ cwalther$ touch comma/test.py nocomma/test.py
buia:~ cwalther$ cd comma                                 
buia:~/comma cwalther$ python2.2 -c "import test"
buia:~/comma cwalther$ cd ../nocomma/
buia:~/nocomma cwalther$ python2.2 -c "import test"
buia:~/nocomma cwalther$ cd ..
buia:~ cwalther$ cmp comma/test.pyc nocomma/test.pyc && echo y || echo n
y
buia:~ cwalther$ decompyle nocomma/test.pyc
Fri Jan  1 14:32:20 2010
# emacs-mode: -*- python-*-
class A:
    __module__ = __name__

class B(A,):
    __module__ = __name__

thisisatuple = (3,)

# local variables:
# tab-width: 4
+++ okay decompyling nocomma/test.pyc
decompyled 1 files: 1 okay, 0 failed, 0 verify failed
Fri Jan  1 14:32:20 2010
buia:~ cwalther$ rm -r comma nocomma

Re: Where am I missing?

PostPosted: Fri Jan 01, 2010 7:00 am
by D'Lanor
Ok, point taken. The main case however is still open because if this isn't the problem then what else could be wrong? SDL file encryption?

I don't think there is much more to say until we get feedback from ametist.