mIRC Homepage
Posted By: Adora HELP! My script just overwrote itself! - 11/06/05 03:46 PM
This is my first 'real' mirc script (ie. more than just a couple of lines) which asks a few basic questions to get mirc setup and running on a specific channel on my server. One of the dialogs had an error (unknown text or something, bleh...I've freaked out and forgotten)...I went in to edit the script again and everything is GONE! All that's left are the variables it would append at the bottom. Even remote.ini (which was stock minus one command) was re-written.

I've tried searching google and here, but I can't find anything to give me a clue about what went wrong. I'd like to know before I go rewriting the last three hours of code. I didn't lose everything, thankfully...but I lost an awful lot. :tongue:
Posted By: RusselB Re: HELP! My script just overwrote itself! - 11/06/05 04:11 PM
Unfortunately, it sounds like you either got hit by a virus, or the information was written to a bad sector on your hard drive. Make sure that your anti-virus is up-to-date and do a full system scan. That should handle the virus option. No really much you can do about a bad sector on your hard drive, unless you're very knowledgeable in that area from a technicians stand point. What I do, and this isn't guaranteed, is that I make a back-up copy of the code when I go to edit it.

Alt+R, Options, Back-up on save. and save at regular intervals. You can save at any time by pressing CTRL+S
Posted By: Adora Re: HELP! My script just overwrote itself! - 11/06/05 04:26 PM
Being caused by a virus doesn't really make sense, nor does a corrupt HD. The code was fine after I saved and reloaded, but after I hit an error in the specific dialog I had been editing, the code for two files were overwritten with only my list of variables.

I've already gone back and enabled backup on save. Apparently saving religiously isn't enough in this case. smirk

Actually, is there any way to save variables to a different file instead of the current script? I'm all paranoid now.
Posted By: DaveC Re: HELP! My script just overwrote itself! - 11/06/05 05:33 PM
you were saving variables to the same file as your code was in? LOL.

Want to show me what you were doing to do that?, sounds a rash idea to begin with personally, and now looks like it was one from the results.
Posted By: tidy_trax Re: HELP! My script just overwrote itself! - 11/06/05 10:24 PM
Maybe he was typing his script in the variables tab.
Posted By: Riamus2 Re: HELP! My script just overwrote itself! - 13/06/05 12:52 PM
Ouch. That wouldn't be good. smile

As far as saving vars somewhere other than remotes.ini, you can /write information to a file... then $read it later. Not the best way to handle regularly used variables, but it's a good way to make a backup of the variables.
© mIRC Discussion Forums