Error:kw_class expected

Hi all, I know the same topic has been created, but I hit with this issue ,and I still don’t know how to solve it


Could anyone give me some advise?
Thanks in advance~

Are you using dynamo 1.3 or 2.0?

i dont think you should put semi colon after your [Imperative] attribute declaration.

Did you try putting out each line into a code block and ensure there isnt any error??

Also please copy and paste your codes into a formatted string etc:
COPY YOUR CODE LIKE THAT
So we can easily copy into our dynamo to help you troubleshoot, you wouldnt expect any of us to slowly type out all your codes or read each line by each line to its finest detail just to troubleshoot for you :slight_smile:

Hi @stillgotme ,Thanks for your advise , here is the codes ,hope this can help :slightly_smiling_face:

HightFactor;
ControlPoint;
PointArray = {};
TranslatedPointArray = {};
TransposedPointArray = {};
NurbsCurve0 = {};
NurbsCurve1 = {};
[Imperative];
{
xrange = (0…20…4);
yrange = (0…20…4);

xcount = Count(xrange);
ycount = Count(yrange);

for (i in 0…(xcount-1))
{
for (j in 0…(ycount-1))
{
PointArray[i][j] =Point.ByCoordinates(xrange[i],yrange[j],0);
}
}
for (i in 0…(xcount-1))
{
for (j in 0…(ycount-1))
{
Dis = HightFactor/PointArray.DistanceTo(ControlPoint);
TranslatedPointArray[i][j] = PointArray.Translate(Vector.ZAxis(),Dis);
}
NurbsCurve0[i] = NurbsCurve.ByPoints(TranslatedPointArray[i]);
}
TransposedPointArray = List.Transpose(TranslatedPointArray);
for (i in 0…(ycount-1))
{
NurbsCurve1[i] = NurbsCurve.ByPoints(TransposedPointArray[i]);
}
};