Page 1 of 1

Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 9:30 pm
by YpsiNine
First off, let me say that I am not a programmer. My first experience with LUA was a few days ago when I decided I would create a mod for Grimrock.
So even if the below hour count is high, there isn't that much code.

Yesterday I worked on a script (let's call it script1) for some 10 hours and finished it nicely.
Then this morning I continued on another script (let's call it script2) for some 5-6 hours, which I also managed to get it to work like I wanted.
Then I went back to play through the dungeon from the start, and script1 didn't kick in.

What was the problem?
Without knowing it, I had apparently copied/pasted all the code from script2 into script1. I didn't have the code in Notepad++ anymore (which I use to code), since the code was finished.

So the brutal lesson is ALWAYS keep a backup of your scripts, even if you finish it! :)

So my tip/request to Antti & Petri : please add a simple lock function in the editor, which we can use to lock the entity (scripts at least) from further edits, something like this:
Image

Thanks.

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 9:33 pm
by SpiderFighter
Ouch. I feel your pain. I once replaced an entire .con file in Duke3D that way. I'm sorry for your loss, brother.

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 9:35 pm
by Komag
wow, that stinks! But I guarantee you if you will work on it again, no matter how much you don't feel like it, the second time it will go TONS faster, like 10 times as fast. You brain will fill in the details like you would not believe.

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 9:58 pm
by LordGarth
Eventually you will learn the scripting and then it will be a piece of cake.

LG

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 10:09 pm
by Komag
well, if he worked 10 hours on a large script project and finished it in good working order, I think he knows the scripting already.

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 10:44 pm
by YpsiNine
Komag wrote:well, if he worked 10 hours on a large script project and finished it in good working order, I think he knows the scripting already.
Let's just say I am already at the finishing line after about 1 hour. Just a few minor details remaining.

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 11:08 pm
by Komag
what'd I say, 10 times as fast!!!

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Thu Oct 11, 2012 11:11 pm
by JohnWordsworth
Oh man, that sucks. Sorry to hear that happened - never nice to lose work, let alone code.

It's a bit of a round trip, but if anyone here is a DropBox user you can symlink (I think they technically call it 'HardLink' or something in Windows) your Dungeons directory to a DropBox folder, which gives you 30 days of backups which you can revert to / download at any time. I do this for my save games, and a lot of my code lives in DropBox now - just in case!

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Sat Oct 13, 2012 3:57 pm
by SpiderFighter
JohnWordsworth wrote:Oh man, that sucks. Sorry to hear that happened - never nice to lose work, let alone code.

It's a bit of a round trip, but if anyone here is a DropBox user you can symlink (I think they technically call it 'HardLink' or something in Windows) your Dungeons directory to a DropBox folder, which gives you 30 days of backups which you can revert to / download at any time. I do this for my save games, and a lot of my code lives in DropBox now - just in case!
Great tip, John. I was a dropbox user a year or two ago and had forgotten about it. Thanks for suggesting it.

Re: Request) Ok, so I had my worst nightmare come true.

Posted: Sat Oct 13, 2012 6:24 pm
by Komag
I have tons of stuff on it, and it automatically syncs with all my laptops and desktops and even my phone!