Note: This forum is merely an archive. It is no longer possible to register or post. - StackOverflow
New Ace of Spades Forums: http://buildandshoot.com/

No more lastsav.vxl over-writing

Got a great new idea for the game?

No more lastsav.vxl over-writing

Postby ReubenMcHawk » Sun Mar 25, 2012 4:49 am

I've had it happen before where I've hit F1 on a server to save a cool map, then gone to another server and accidentally hit F1 instead of Esc while leaving, deleting the old saved map.

My suggestion is that, each time F1 is hit, it saves a new map, as lastsav.vxl, lastsav(2).vxl, etc...

Or take it a step further, and put a date/timestamp on it. I.E.
20110815-08:35:15.vxl
20120118-15:23:31.vxl
20120334-20:49:58.vxl

Any thoughts?
User avatar
ReubenMcHawk
Member
 
Posts: 541
Joined: Sat Dec 10, 2011 8:15 pm
Location: Ethiopia

Re: No more lastsav.vxl over-writing

Postby Pulchritude » Sun Mar 25, 2012 4:51 am

yes is my thought
Cats > dogs
FACT.
User avatar
Pulchritude
[LDR] Member
 
Posts: 386
Joined: Wed Dec 28, 2011 10:00 am
Location: Complete Tranquility

Re: No more lastsav.vxl over-writing

Postby Paratrooper » Sun Mar 25, 2012 5:11 am

You can't have colons (:) in a filename, so...
To a Physicist, white and black is the presence and absence of color.
To a Fine Artist, white and black are just shades and tints of color.
To a Painter, any paint that you could get into a can is a color.
THIS color, on the other hand, is #b4d455.
User avatar
Paratrooper
Local Mod
 
Posts: 1590
Joined: Thu Feb 16, 2012 2:40 am
Location: California (-8:00 GMT)

Re: No more lastsav.vxl over-writing

Postby ReubenMcHawk » Sun Mar 25, 2012 5:28 am

Then I guess replace them with periods, or something else.
User avatar
ReubenMcHawk
Member
 
Posts: 541
Joined: Sat Dec 10, 2011 8:15 pm
Location: Ethiopia

Re: No more lastsav.vxl over-writing

Postby IrishElf » Sun Mar 25, 2012 6:20 am

Yes, love this idea. +1
Image
User avatar
IrishElf
Member
 
Posts: 767
Joined: Tue Dec 27, 2011 4:28 pm
Location: Socialist Canada.

Re: No more lastsav.vxl over-writing

Postby Szuwar » Sun Mar 25, 2012 12:27 pm

On linux this code will do the job. Just put it in the game folder and run it before you start playing.
Code: Select all
#!/bin/bash

if [ -e lastsav.vxl ]; then
    cp lastsav.vxl last.vxl
else
    touch last.vxl
fi

while [ true ];
do
    if [ -e lastsav.vxl ]; then
        cmp lastsav.vxl last.vxl -s
        if [ $? -eq 0 ]; then #same
            rm lastsav.vxl
        else
            cp last.vxl `date +%s`".vxl"
            cp lastsav.vxl last.vxl
            rm lastsav.vxl
        fi
    fi
    sleep 2
done

It might be buggy so might need some corrections. Should work fine as long as you won't remove last.vxl or lastsav.vxl while script is running.
I do not have Windows version.
User avatar
Szuwar
Member
 
Posts: 31
Joined: Thu Dec 29, 2011 6:20 pm

Re: No more lastsav.vxl over-writing

Postby BlueToonYoshi » Sun Mar 25, 2012 6:50 pm

OMG yes! This has been a real problem with the saving map feature. I totally agree with this!
User avatar
BlueToonYoshi
Member
 
Posts: 240
Joined: Sun Feb 19, 2012 6:03 am
Location: Mississippi

Re: No more lastsav.vxl over-writing

Postby LASTofS » Mon Mar 26, 2012 1:34 am

Yeah, I accidentally overwrote a save file recently. :(
ImageImageImage
Join the [LoS] (last of spades) clan here | my greatest contribution: Image icon on openGL client
User avatar
LASTofS
News Reporter
 
Posts: 852
Joined: Sat Jan 21, 2012 6:34 pm
Location: pls there are kids in here


Return to Game



Who is online

Users browsing this forum: No registered users and 2 guests

cron