mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2024-11-13 00:34:17 +00:00
add absolute path to rating db
This commit is contained in:
parent
6412663eba
commit
a5b4a0b768
1 changed files with 6 additions and 2 deletions
|
@ -27,6 +27,9 @@ local env -- environment object
|
|||
local con -- database connection
|
||||
local cur -- cursor
|
||||
|
||||
-- database path
|
||||
local dbpath = string.gsub(et.trap_Cvar_Get("fs_homepath"), "\\", "/").."/"..et.trap_Cvar_Get("fs_game").."/"
|
||||
|
||||
-- check feature
|
||||
local g_skillRating = tonumber(et.trap_Cvar_Get("g_skillRating"))
|
||||
|
||||
|
@ -104,7 +107,7 @@ function et_InitGame(levelTime, randomSeed, restart)
|
|||
env = assert(luasql.sqlite3())
|
||||
|
||||
-- connect to database
|
||||
con = assert(env:connect("rating.sqlite"))
|
||||
con = assert(env:connect(dbpath .. "rating.sqlite"))
|
||||
|
||||
-- drop database
|
||||
-- cur = assert(con:execute("DROP TABLE users"))
|
||||
|
@ -363,4 +366,5 @@ function et_ConsoleCommand()
|
|||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue