Auto Save

Author Topic: Auto Save  (Read 9191 times)

rudyman

  • Guest

I will now test code.  :cookieMonster:

Can somebody just give us a script and a command? That would help.

quitGame();

That will help us all :P

What about this. This would give you a time variance and the ability to save to a specific file name:
Code: [Select]
function AutoSave(%mins, %name)
{
     savebuild(%name);
%minutes=%mins * 1000 * 60
     schedule(%minutes,0,AutoSave);
}
« Last Edit: March 18, 2007, 08:24:03 PM by 1529op »

Code: [Select]
function AutoSave(%name,%minutes,%load,%cancel);
{
     if(%cancel $= "cancel")
     {
          cancel($AutoSave);
     }
     else if(%load $= "load")
     {
          loadbricks(%name);
     }
     else
     {
          schedule(%minutes @ "000,savebuild," @ %name);
          $AutoSave= schedule(%minutes @ "000,AutoSave");
     }
}
Put a little planning into this, and you might do well.
It thrills me to point out that this code you supposedly "fixed" is still wrong. I just took a closer look and this would not only give syntax errors, but would also do the same as the script below.

What about this. This would give you a time variance and the ability to save to a specific file name:
Code: [Select]
function AutoSave(%mins, %name)
{
 savebuild(%name);
%minutes=%mins * 1000 * 60
 schedule(%minutes,0,AutoSave);
}
This would save the build to ".blb" every 0 miliseconds after the first save.


Code: [Select]
function AutoSave(%name,%minutes,%load,%cancel);
{
if ($cancel = cancel)
{
cancel($AutoSave);
}
else if ($load = load)
{
loadbricks("" @ %name @ "");
}
else
{
schedule("" @ %minutes @ "000,savebuild," @ %name @ "");
$AutoSave= schedule("" @ %minutes @ "000,AutoSave");
}
}
That won't work, it will give you a syntax error, good job, fix it. You need to TEST your scripts before you release them and you also need to ACTUALLY LEARN TO SCRIPT.
And YOU need to stop lurking around these forums waiting for a moment to "prove" how big your e-penor is. Its funny how the only mod you ever made was for player abuse, yet you're such a nice guy on the forums.
« Last Edit: March 19, 2007, 10:44:40 AM by Ephialtes »

Ephialtes, please post one that works...

Blockland\base\server\temp\temp.bls <----This file is an autosave file :/


What it? O_O. I was going though my files once and found that. I looked inside and found items called "Teleporter" in it, which were just in my server. That seems to be an autosave....so why ask for help making your own.

MasterCE, temp.bls is where the lines from a client-uploaded save file are sent.