mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2024-11-23 04:42:22 +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 con -- database connection
|
||||||
local cur -- cursor
|
local cur -- cursor
|
||||||
|
|
||||||
|
-- database path
|
||||||
|
local dbpath = string.gsub(et.trap_Cvar_Get("fs_homepath"), "\\", "/").."/"..et.trap_Cvar_Get("fs_game").."/"
|
||||||
|
|
||||||
-- check feature
|
-- check feature
|
||||||
local g_skillRating = tonumber(et.trap_Cvar_Get("g_skillRating"))
|
local g_skillRating = tonumber(et.trap_Cvar_Get("g_skillRating"))
|
||||||
|
|
||||||
|
@ -104,7 +107,7 @@ function et_InitGame(levelTime, randomSeed, restart)
|
||||||
env = assert(luasql.sqlite3())
|
env = assert(luasql.sqlite3())
|
||||||
|
|
||||||
-- connect to database
|
-- connect to database
|
||||||
con = assert(env:connect("rating.sqlite"))
|
con = assert(env:connect(dbpath .. "rating.sqlite"))
|
||||||
|
|
||||||
-- drop database
|
-- drop database
|
||||||
-- cur = assert(con:execute("DROP TABLE users"))
|
-- cur = assert(con:execute("DROP TABLE users"))
|
||||||
|
@ -364,3 +367,4 @@ function et_ConsoleCommand()
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue