If you want to tile a texture then you need to scale it by an appropriate amount:
scaletexture texture,0.5,0.5 ;this will tile it such that the texture appears twice in both directions (u,v) on mesh.
scaletexture texture,0.25,0.25 ;this will tile is such that the texture appears 4 times in both directions (u,v) on mesh.
scaletexture texture,0.125,0.125 ;8 times
and so on..
If you want it to repeat 2 times then you would need to scale by 1.0/2.0 (ie 0.5), if you want it to repeat 4 times then 1.0/4.0 (ie 0.25)
If you want it to repeat 256 times, as an example, then you will need to scale it by 1.0/256.0
scaletexture texture,0.5,0.5 ;this will tile it such that the texture appears twice in both directions (u,v) on mesh.
scaletexture texture,0.25,0.25 ;this will tile is such that the texture appears 4 times in both directions (u,v) on mesh.
scaletexture texture,0.125,0.125 ;8 times
and so on..
If you want it to repeat 2 times then you would need to scale by 1.0/2.0 (ie 0.5), if you want it to repeat 4 times then 1.0/4.0 (ie 0.25)
If you want it to repeat 256 times, as an example, then you will need to scale it by 1.0/256.0