mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-07-05 16:02:23 +02:00
parent
9a03f7ec5c
commit
8e8aeef0f7
@ -81,7 +81,7 @@ func ReadSessionSaveData(uuid []byte, slot int) (defs.SessionSaveData, error) {
|
|||||||
|
|
||||||
func GetLatestSessionSaveDataSlot(uuid []byte) (int, error) {
|
func GetLatestSessionSaveDataSlot(uuid []byte) (int, error) {
|
||||||
var slot int
|
var slot int
|
||||||
err := handle.QueryRow("SELECT slot FROM sessionSaveData WHERE uuid = ? ORDER BY timestamp DESC LIMIT 1", uuid).Scan(&slot)
|
err := handle.QueryRow("SELECT slot FROM sessionSaveData WHERE uuid = ? ORDER BY timestamp DESC, slot ASC LIMIT 1", uuid).Scan(&slot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return -1, err
|
return -1, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user