• 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!

Compiling Avesta 0.6.3 Auto Save

destroyer667

Member
Joined
Nov 21, 2007
Messages
290
Reaction score
6
I've searched every single page on this forum and otfans with the search words "Avesta auto save" and some others i used and i've yet to find anything thats straight to the point on how to do it.

I'm trying to compile in auto save to my server.

(I'm using Avesta 0.6.3 and dev-cpp 4.9.9.2)

1: What source files do i compile the code in?
2: what codes do i need and is there a specific spot i need to put them into the source files?
3: I tried to look at the Avesta v4 server sources but the link is broken. does anyone have a link? or could reupload them.
 
I tried to compile in what you posted Ckyotitan and i got this error. here is my game.cpp file.

errors
PHP:
 game.cpp In member function `void Game::autoServerSave()': 
 game.cpp no matching function for call to `Game::saveServer(bool)' 
 game.cpp:175 candidates are: void Game::saveServer() 
 Makefile.win [Build Error]  [game.o] Error 1
game.cpp Line 3386
Lua:
void Game::autoServerSave() {
        saveServer(false);
        Scheduler::getScheduler().addEvent(createSchedulerTask(g_config.getNumber(ConfigManager::SERVER_SAVE) * 60000,
        boost::bind(&Game::autoServerSave, this)));

game.cpp
View attachment game.rar



Scanned for you to.
http://www.virustotal.com/file-scan...eb4ca6936c7fe640eef5c968d49d31e093-1305670662

Code:
File name: game.rar
Submission date: 2011-05-17 22:17:42 (UTC)
Current status: finished
Result: 0/ 42 (0.0%)


Antivirus	Version	Last Update	Result
AhnLab-V3	2011.05.18.00	2011.05.17	-
AntiVir	7.11.8.50	2011.05.17	-
Antiy-AVL	2.0.3.7	2011.05.17	-
Avast	4.8.1351.0	2011.05.17	-
Avast5	5.0.677.0	2011.05.17	-
AVG	10.0.0.1190	2011.05.17	-
BitDefender	7.2	2011.05.18	-
CAT-QuickHeal	11.00	2011.05.17	-
ClamAV	0.97.0.0	2011.05.17	-
Commtouch	5.3.2.6	2011.05.17	-
Comodo	8737	2011.05.17	-
DrWeb	5.0.2.03300	2011.05.18	-
eSafe	7.0.17.0	2011.05.17	-
eTrust-Vet	36.1.8332	2011.05.17	-
F-Prot	4.6.2.117	2011.05.17	-
F-Secure	9.0.16440.0	2011.05.17	-
Fortinet	4.2.257.0	2011.05.17	-
GData	22	2011.05.17	-
Ikarus	T3.1.1.104.0	2011.05.17	-
Jiangmin	13.0.900	2011.05.17	-
K7AntiVirus	9.103.4669	2011.05.17	-
Kaspersky	9.0.0.837	2011.05.17	-
McAfee	5.400.0.1158	2011.05.18	-
McAfee-GW-Edition	2010.1D	2011.05.17	-
Microsoft	1.6802	2011.05.18	-
NOD32	6130	2011.05.17	-
Norman	6.07.07	2011.05.17	-
nProtect	2011-05-17.01	2011.05.17	-
Panda	10.0.3.5	2011.05.17	-
PCTools	7.0.3.5	2011.05.17	-
Prevx	3.0	2011.05.18	-
Rising	23.58.01.05	2011.05.17	-
Sophos	4.65.0	2011.05.17	-
SUPERAntiSpyware	4.40.0.1006	2011.05.17	-
Symantec	20101.3.2.89	2011.05.17	-
TheHacker	6.7.0.1.199	2011.05.17	-
TrendMicro	9.200.0.1012	2011.05.17	-
TrendMicro-HouseCall	9.200.0.1012	2011.05.18	-
VBA32	3.12.16.0	2011.05.12	-
VIPRE	9309	2011.05.18	-
ViRobot	2011.5.17.4463	2011.05.17	-
VirusBuster	13.6.359.0	2011.05.17	-


MD5   : 12a6591b4401dc20efeded4ffab4950d
SHA1  : c4b6db178391018a97351dbabe2920d756f5ece8
SHA256: b1f9590b537b4a7b08a8b6f084801ceb4ca6936c7fe640eef5c968d49d31e093



4lngo0.jpg


Ok i honestly don't care if i compile this in i just want my server to auto save every minute. I can use /save and the server works fine. So i used a bunch of different scripts i found while searching and i always get this error. "SaveData" A nil value. or w.e "Save" i use. I've used "saveServer" "saveGameState" and a few others i forgot. Now i noticed TFS 7.6 has this talk actions when i use "/save 1" it saves every minute so i put it into my server now it get this error. "attempt to call global "saveServer" a nil value. do i have to add some kind of function into my gobal? i checked my sources and i have "saveServer" and "saveGameState" in my sources.
 
Last edited by a moderator:
just because you have it somewhere in sources, it doesn't mean it's available to be used in Lua scripts.

about the compiling error, change
[cpp]saveServer(false);[/cpp]
to
[cpp]saveServer();[/cpp]
if everything compiles well, you still won't have a Lua function but atleast you'll get an autosave.
 
Back
Top