![]() |
Re: So i played a bit with C# lately
Quote:
|
Re: So i played a bit with C# lately
Actually that Java code doesn't really exist anymore. When i realized what crap code i had written there i tried refactor it but were distracted in the middle and now i doubt i'll touch it again. http://forum.shrapnelgames.com/images/smilies/smirk.gif
|
Re: So i played a bit with C# lately
Quote:
Generic steps and checks to the program? At its simplest Im picturing zip game into game.zip A variation might be something which runs as --postexec to read a --scoredump (or status file) in order to get a turn number. Then it could support "every 5 turns" or "rotating saves numbered 1-5" Personally I avoid GUI menus but I suppose it could evelve into something menu driven for restores of old games. |
Re: So i played a bit with C# lately
What does it do? I sound like a simple job for a Perl script. (Don't tell me that windows doesn't provide Perl [img]/threads/images/Graemlins/ooo.gif[/img])
|
Re: So i played a bit with C# lately
Microsoft doesn't "provide" Perl with Windows (MS is averse to all things they didn't invent/steal), but IIRC you can get Perl to work on Windows systems.
|
Re: So i played a bit with C# lately
Quote:
In any case, the subject itself would probably lend itself well to a flow-chart type discussion which could be written in any language. |
Re: So i played a bit with C# lately
Quote:
<font class="small">Code:</font><hr /><pre> gawk -f save_script.awk </pre><hr /> where save_script.awk contains: <font class="small">Code:</font><hr /><pre> BEGIN { timestamp_file = "Last-total-save-timestamp.txt"; t = systime(); stamp = strftime("%Y%m%d-%H%M%S",t); stamp2 = strftime("%Y-%m-%d",t); saveAll = 1; if ((getline Last_stamp < timestamp_file) > 0) { if (stamp2 == Last_stamp) saveAll = 0; } close(timestamp_file); if (saveAll) { cmd = sprintf("zip -r save-all-%s * -i@save.lst",stamp); print stamp2 > timestamp_file; } else cmd = sprintf("zip -r -t %s save-%s * -i@save.lst",Last_stamp,stamp); system(cmd); } </pre><hr /> |
All times are GMT -4. The time now is 02:00 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.