Merge pull request #6 from Marin-MK/master

Error message improvements
This commit is contained in:
Maruno17
2020-09-05 20:26:23 +01:00
committed by GitHub
221 changed files with 942 additions and 941 deletions

Binary file not shown.

View File

@@ -1550,7 +1550,7 @@ PokemonChallengeRules.new
# Battle Time (includes animations)
If the time runs out, the team with the most Pokémon left wins. If both teams have
If the time runs out, the team with the most Pok<EFBFBD>mon left wins. If both teams have
the same number of Pokémon left, total HP remaining breaks the tie. If both HP
totals are identical, the battle is a draw.

View File

@@ -61,10 +61,11 @@ def pbPrintException(e)
errorlog = RTP.getSaveFileName("errorlog.txt")
end
File.open(errorlog,"ab") { |f| f.write(premessage); f.write(message) }
errorlogline = errorlog.sub(Dir.pwd+"\\","")
errorlogline = errorlogline.sub(Dir.pwd+"/","")
errorlogline = errorlogline.gsub("/","\\")
errorlogline = "\r\n"+errorlogline if errorlogline.length>20
errorlogline = errorlog.sub("/", "\\")
errorlogline.sub!(Dir.pwd + "\\", "")
errorlogline.sub!(pbGetUserName, "USERNAME")
errorlogline = "\r\n" + errorlogline if errorlogline.length > 20
errorlogline.gsub!("/", "\\")
print("#{message}\r\nThis exception was logged in #{errorlogline}.\r\nPress Ctrl+C to copy this message to the clipboard.")
end