Advertisement
Guest User

Untitled

a guest
Dec 13th, 2015
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.38 KB | None | 0 0
  1. desktop   = ENV['HOME'] + '/desktop'
  2.  
  3. Dir.chdir desktop + '/pinGen'
  4.  
  5. begin
  6.   runtill = IO.readlines("settings.txt")[0].to_i
  7.  
  8. rescue
  9.   puts "Error, cannot load data from settings.txt."; sleep 4; exit
  10.  
  11. end
  12.  
  13.  
  14. if !runtill.is_a? Integer || runtill.nil? || runtill.empty? # I also tried if not runtill... didn't work
  15.   runtill = 100
  16.   puts "\nruntill was edited"
  17. end
  18.  
  19. puts "END"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement