Alert error message

This commit is contained in:
oc 2018-12-21 10:50:11 +08:00
parent 0ffd8d46d9
commit ec91d8c7a2
2 changed files with 12 additions and 10 deletions

View File

@ -2076,10 +2076,10 @@ control.prototype.doSL = function (id, type) {
}, function(err) {
console.info(err);
if (core.platform.useLocalForage) {
alert("存档失败,请将控制台的报错信息反馈给管理员。");
alert("存档失败,错误信息:\n"+err);
}
else {
alert("存档空间不足,请先使用垃圾存档清理工具进行清理!");
alert("存档失败,错误信息:\n"+err+"\n建议使用垃圾存档清理工具进行清理!");
}
})
return;
@ -2093,7 +2093,9 @@ control.prototype.doSL = function (id, type) {
return;
}
if (core.isset(data.hashCode) && data.hashCode != core.utils.hashCode(data.hero)) {
alert("存档校验失败,请勿修改存档文件!");
if (confirm("存档校验失败,请勿修改存档文件!\n你想回放此存档的录像吗")) {
core.startGame(data.hard, data.hero.flags.__seed__, core.decodeRoute(data.route));
}
return;
}
if (data.version != core.firstData.version) {

View File

@ -436,18 +436,17 @@ utils.prototype.decodeRoute = function (route) {
index++;
return str;
}
var mp = {
"U": "up",
"D": "down",
"L": "left",
"R": "right"
}
while (index<route.length) {
var c=route.charAt(index++);
var nxt=(c=='I'|| c=='e' ||c=='F'||c=='S'||c=='Q'||c=='t')?getString():getNumber();
var mp = {
"U": "up",
"D": "down",
"L": "left",
"R": "right"
}
switch (c) {
case "U": case "D": case "L": case "R": for (var i=0;i<nxt;i++) ans.push(mp[c]); break;
case "I": ans.push("item:"+nxt); break;
@ -639,6 +638,7 @@ utils.prototype.readFileContent = function (content) {
}
catch (e) {
console.log(e);
alert(e);
}
alert("不是有效的JSON文件");