b32 #1 Me too, I use return to exit the function: Function ScanTextures() for i = 0 to maxtextures if texture(i) = 0 then return 0 next .. some other stuff .. return 1 End Function But thanks, so that means I don't have call 'exit' first.