SetupLight in sample is deprecated=>Crash Bam File,plz he

I’ve tried to save the scenegraph from the different samples.
It works fine as long as there is no light setup (i had to comment them out).
With light i’ve got the following error msg at bam saving time:

:pgraph(warning): Using deprecated LightAttrib interface.
:pgraph(warning): Using deprecated LightAttrib interface.

At Bam loading time i’ve got Windows memory errors.

However i’noticed that the warning concerning LightAttrib is not due to bam file.it’s due to setupLight code in the samples.

How can i correc the setupLight code to avoid this warning (and hopefully stop crashing my bam file?)

Presently, writing a bam file that contains a light is not fully implemented in Panda–so it crashes. Sorry about that. It’s not related to the deprecated LightAttrib message.

However, if you wanted to fix the message, you would replace the explicit calls to LightAttrib with the new interface, nodepath.setLight() or nodepath.clearLight().

David