.mod import and export -need help w/types

I have recently developed the weird Idea that I might mod armagetron advanced (armagetronad.net) and i found out that it’s data type (.mod) is extremely similar to .obj

.obj:

v 1.00 2.00 5.00
v 3.30 -1.39 -0.01
v 1.00 1.00 0.00
f 1 2 3

this creates a face from verts at the coordinates after the v’s

.mod

v 1 1.00 2.00 5.00
v 2 3.30 -1.39 -0.01
v 3 1.00 1.00 0.00
f 1 2 3

note the only differance: the vertice number after the v

so modifying the import script was easy, just tell it to skip the second word

but my problem is with the export script,
i used this syntax for the verts:

for verts in mesh.verts:
vnum = vert.index + 1 #blender starts at 0, .mod at 1
v0 = len(range(0,vnum)) #yes, I know I could have used v0 = int(vnum)
out.write( 'v %f %f %f
’ % (f0, vert.co.x, vert.co.y, vert.co.z) )

my problem is, it writes the f0 (which I made into an integer) as a float:

v 1.00000 x,y,z
v 2.00000 x,y,z
etc…

so my question is: how can I make it write it as an int?

btw, here’s the scripts:

http://addertooth.net/blender/files/artradmod.zip

oops, sorry. just figured it out, i put %f instead of %i… stupid me.

ah well, i’ll upload a fixed version

edit: re-uploaded, should work now