Milkshape 3d models

one of the NeHe tutorials gives me code to load Milkshape 3d models, but it only works for Milkshape 1.3 and 1.4, I use Milkshape 3d 1.7.0

What do i need to modify or what code should i use to correctly load those models?

The code i have loads the models, but not the textures even though the textures are present in the same folder.