修复conf/account没改完导致账户信息存不上文件
This commit is contained in:
3
main.lua
3
main.lua
@@ -42,7 +42,7 @@ for _,v in next,{"conf","record","replay"}do
|
||||
::NEXT::
|
||||
end
|
||||
|
||||
--Delete useless mode record file
|
||||
--Delete useless files
|
||||
for _,v in next,{
|
||||
"tech_ultimate.dat",
|
||||
"tech_ultimate+.dat",
|
||||
@@ -51,6 +51,7 @@ for _,v in next,{
|
||||
"marathon_ultimate.dat",
|
||||
"infinite.dat",
|
||||
"infinite_dig.dat",
|
||||
"conf/account",
|
||||
}do
|
||||
if fs.getInfo(v)then fs.remove(v)end
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ local function tick_httpREQ_newLogin(task)
|
||||
LOG.print(text.loginSuccessed)
|
||||
USER.email=res.email
|
||||
USER.auth_token=res.auth_token
|
||||
FILE.save(USER,"conf/account","q")
|
||||
FILE.save(USER,"conf/user","q")
|
||||
|
||||
httpRequest(
|
||||
TICK.httpREQ_getAccessToken,
|
||||
|
||||
@@ -10,7 +10,7 @@ function Tick.httpREQ_getAccessToken(task)
|
||||
if res then
|
||||
LOG.print(text.accessSuccessed)
|
||||
USER.access_token=res.access_token
|
||||
FILE.save(USER,"conf/account")
|
||||
FILE.save(USER,"conf/user")
|
||||
SCN.swapTo("netgame")
|
||||
else
|
||||
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")
|
||||
|
||||
Reference in New Issue
Block a user