• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action How to add server save!

Colandus

Advanced OT User
Senator
Joined
Jun 6, 2007
Messages
2,434
Solutions
19
Reaction score
218
Location
Sweden
So, place this at bottom of global.lua:
PHP:
saveDelay = 10 * 60 * 1000 -- 10 minutes for each save. 
storageValue = 2342 

if (getGlobalStorageValue(storageValue) == -1) then 
    function save(saveDelay) 
        saveData() 
        debugPrint(">>>>PLAYERS SAVED<<<<") 
        addEvent(save, saveDelay, saveDelay) 
    end 
    addEvent(save, saveDelay, saveDelay) 
    setGlobalStorageValue(storageValue, 1) 
end

And just change the delay of each save, and you're done ;)

If it doesn't work, place it in data/actions/lib/actions.lua instead!

Gimme rep if you like/use it plx :D
 
Last edited:
I got alloot of buggs when adding this to 0.2.10

all got debugg if they used mana potions etc.

got theese condition errors. cant say them exatly because I had to restart the server right away.
 
This dosnt seem to work propherly on TFS 0.2.10
 
its working good when you are using console :p
and when i compiled the gui it started to make some weird problems :p
but on gui you got "save online players" button :p sooo you dont need that then :D
 
its working good when you are using console :p
and when i compiled the gui it started to make some weird problems :p
but on gui you got "save online players" button :p sooo you dont need that then :D

Im using console, but seems like the sever went crazy when I added it.
 
If it doesn't work, place it in data/actions/lib/actions.lua instead!
 
Hmm... :S

Did you really place it in global.lua etc? ^.- It's wierd it doesn't work...
Try in data/actions/lib/actions.lua instead... Might work if you're lucky!
 
It didnt print out in GUI but it has been saving the game for me.
Although, Im using the one in C++ :p
 
I placed it in global.lua and in data/actions/lib/actions.lua, but it doesn't solve problem.
@up: thanks for info
 
Last edited:
Back
Top