PDA

View Full Version : Newbie Question - Compiled Script gives "Line 28: invalid object reference"



B_Free
10-11-2009, 04:12 PM
Hi Everyone :help:

I just finished writing my first Lscript, an Item Animation script. It compiles just fine, it loads as a plugin just fine, and I can add it into an object's "Motion Options" window just fine.

In fact the whole thing would be just fine were it not for one tiny problem: it doesn't actually DO anything.

Here's my question: how do I go about debugging this thing? With all the other code I've written I've put in little println() commands that write out the value of my variables on the screen as it executes. Is there a way to do that with Lightwave scripts? What's the best way to debug scripts in Lightwave? :confused:

Thank you very much in advance!!! And I hope that this isn't too much of a newbie question for everyone!! :)

======================
P.S. Sorry the question doesn't match the Thread Name in the forum.
I solved my original question but then I got this one.

evenflcw
10-12-2009, 04:51 PM
Use debug() anywhere in the code to trigger/start the lscript debugger.

B_Free
10-13-2009, 09:21 PM
Thank you, evenflcw! :)