First, I recommend reading the
ASL specification, it will help you a lot. As for your code, I've got several more notes:
$model = project.CurObject;
The "$model" variable is not declared in your code...
The "CurObject" function returns the current object, not the current shape. To select certain shape inside your object, use the "project.curObject.LookupShape(<<name>>);" function as Francesco suggested. You can also use "project.curObject.GetShapes(<<array>>);" to get an array of all shapes.
GetNumPoints($model)
Correct syntax is "$model.GetNumPoints();"
Oh, and Francesco is right, it really helps a lot to read the console output to find out what's wrong

Good luck!