Author Topic: Console command to load a save?  (Read 1062 times)

I need to know what the console cmd is to load up a save, and if there is anyway to check if that save exists before trying to load it.

Thanks in advance

I agree. I also need the command. I remember it was loadP... something... (); and saveP...(); but I can't remember what it was.
I don't want an addon, I want a console command. I can't join my server, so I need a command to save my build.



:cookieMonster: :cookieMonster: :cookieMonster: :cookieMonster: :cookieMonster: :cookieMonster: :cookieMonster: :cookieMonster:

Don't spam. Nobody likes spam and that could cause you a ban.

There's a function called serverloadbricksdirect("base/saves/MapName/Save.bls"); which you can use serverside, I think.

EDIT: Ah, in the Tutorial source:
serverDirectSaveFileLoad("base/saves/tutorial/TutorialBricks.bls", 3);

The 3 is the method of loading colours, replacing them with the ones in the file, matching to nearest in paint set, adding them to the end, etc. I don't know what number means which method, though.

You'd have something like:

Code: [Select]
function servercmdload(%client,%file)
{
 if(isFile("base/saves/" @ %file @ ".bls") && %client.isSuperAdmin)
 {
  serverDirectSaveFileLoad("base/saves/" @ %file @ ".bls", 3);
 }
}

Then someone would type /load Slate/SaveName to load "SaveName" for Slate. Bear in mind that this loads files from the host's computer, not whoever types the command. (You'd need stuff to upload the file for the other)

Found it :p