I run a dedicated server for The Building Association clan and I need help trying to setup a script that will allow me to set the server to AutoSave every 15 minutes or so.
I found this code snippet while searching the forums for a solution:
function AutoSave()
{
savebuild("AUTOSAVE");
$AutoSave = schedule(900000,0,AutoSave);
}
I wrapped it up into its own server.cs and packaged it in a .zip with a description.txt file. I then loaded it onto the dedicated server via the Add-Ons option under Start Game (then quit out of BL and started the dedicated server.) However, I cannot call the command from the console when I am in the server. It just keeps telling me Invalid Function (or something similar). I guess I have a couple questions.
(1) Is an autosave function on the server-side possible?
(2) Is the code above OK? Have any more experienced BL scriptwriters written a better script that can take care of this problem?
(3) What am I doing wrong (or am I doing everything wrong?), and what can I do to fix the problem so it works?
Thank to anyone who can help.