yojimbos_law

improving reliability of map_to_file()

Mar 24th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. string[int][int][int] testes;
  2. file_to_map("testes.txt",testes);
  3. string[int] import_test;
  4. file_to_map("testes.txt",import_test);
  5.  
  6. int dunno_something = get_property("_dunno_something").to_int()+1;
  7. set_property("_dunno_something",get_property("_dunno_something").to_int()+1);
  8. int whateverer = get_property("_whateverer").to_int()+69;
  9. set_property("_whateverer",get_property("_whateverer").to_int()+69);
  10. int whateverest = get_property("_whateverest").to_int()+420;
  11. set_property("_whateverest",get_property("_whateverest").to_int()+420);
  12. string whatevererest = dunno_something.to_string() + whateverer.to_string() + whateverest.to_string();
  13.  
  14. int lines_before_saving;
  15. int lines_after_saving;
  16. while(lines_before_saving >= lines_after_saving){
  17. lines_before_saving = 0;
  18. lines_after_saving = 0;
  19. testes[dunno_something][whateverer][whateverest] = whatevererest;
  20.  
  21. foreach i in import_test{
  22. lines_before_saving++;
  23. }
  24. print("lines before saving: "+lines_before_saving);
  25.  
  26. map_to_file(testes,"testes.txt");
  27. file_to_map("testes.txt",import_test);
  28. foreach i in import_test{
  29. lines_after_saving++;
  30. }
  31. print("lines after saving: "+lines_after_saving);
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment