variable undefined in script: Copy_PathControled_Object_Along_Same_Spline.ms

Hiya,

I'm relatively n00b to MaxScript, today is my 1st look at ScriptSpot. I found a script that I'm very interested in using, but when I run the script, it tells me that the variable 'percent is undefined' per this line:

newLink.pos.controller.percent = (newLink.pos.controller.percent + (100.0/(NumberCopies as float)))

Easy enough error, but being new to MaxScript, I'm not sure how to define 'percent', so I was hoping for a lil' bit of help here to get me going. I've posted the entire script below, which is available at: http://www.hyperent.com/ - for those of you who have not seen the site before.

Thanks in advance,
~Chipley

--The mentioned script--

/*
[DESCRIPTION]

This script will take ann object that is on a path (using a path controller) and make X copies of it along the spline.

[USAGE]

Select the object then run the script. The listener will come up and ask for the number of copies. Enter the number and hit enter.

[CREATION INFO]
Author:Paul Hormis
Last Updated: January 23, 2005

[VERSION HISTORY]
v1.00 Created
v2.00 Initial Public Posting

Copyright (C) 2004, 2005 Paul Hormis

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

paul@time-in-motion.com
*/

OCLink = selection as array

OldLink = OCLink[1]

clearListener()

actionMan.executeAction 0 "40472"

NumberCopies = getKBValue prompt:"Enter the number of copies you want:"

for i in 1 to NumberCopies do
(

NewLink = copy OldLink

newLink.pos.controller.percent = (newLink.pos.controller.percent + (100.0/(NumberCopies as float)))

OldLink = NewLink

)

clearListener()