Hi VBSmiles,
one of the things that went wrong is the comparison you use in the if test. The boolean "is equal to" is "==", a single equal sign is used for assignation.
Another thing you missed is the "do" at the end of the "for" statement. Also you shouldn't be using functions such as "GetNumPoints()" as stand alone, it should be something like "$curshape.GetNumPoints()", where $curshape needs to be properly assigned with a new shape or an existing one, such as in:
$curshape = project.curObject.LookupShape("mesh01");
If you take a look at the Anim8or console while loading a script, some of the common mistakes are pointed out by the script parser.
Reading some already working script does help too, I've learnt a lot only by reading the scripts that NickE and Kubajzz shared on the forum.