I use normally c.v instead of c to avoid that NULL line:
CONTACT* c = ent_getvertex(terrain_entity,NULL,vertexnum);
c.v.y += (float)increase; // float and y, because here we need to use DirectX coordinates,
ent_setvertex(terrain_entity,c,vertexnum);
updatehull is not needed as hull is updated properly from A8.40.3
I would not hardcode vertex quantity, you can use
var verticesx = ent_status(terrain_entity,2)+1;