summaryrefslogtreecommitdiff
path: root/script/service/service.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/service/service.lua')
-rw-r--r--script/service/service.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/script/service/service.lua b/script/service/service.lua
index 82c192b6..cd4a9c9a 100644
--- a/script/service/service.lua
+++ b/script/service/service.lua
@@ -145,12 +145,23 @@ function m.startTimer()
end
end
+function m.testVersion()
+ local stack = debug.setcstacklimit(201)
+ if debug.setcstacklimit(stack) == 201 then
+ proto.notify('window/showMessage', {
+ type = 2,
+ message = 'It seems to be running in Lua 5.4.0 or Lua 5.4.1 . Please upgrade to Lua 5.4.2 or above. Otherwise, it may encounter weird "C stack overflow", resulting in failure to work properly',
+ })
+ end
+end
+
function m.start()
util.enableCloseFunction()
await.setErrorHandle(log.error)
pub.recruitBraves(4)
proto.listen()
m.report()
+ m.testVersion()
require 'provider'