Script file is suddenly empty?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Desichan
Regular
Posts: 40
Joined: Sat Sep 24, 2016 6:02 pm
IRC Nick: Desichan
Tumblr: Desichan
Contact:

Script file is suddenly empty?

#1 Post by Desichan » Sat Oct 29, 2016 10:27 pm

So my issue is I tried opening my game suddenly, and my first script file completely disappeared. I don't really know how to fix this, and from googling it sounded like backing up my rpyc file would be good but I wasn't sure why...

Umm... I really want to be able to get my script back, is there anything I can do to fix this issue? I mean, the script is just gone...
Image

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Script file is suddenly empty?

#2 Post by indoneko » Sat Oct 29, 2016 10:49 pm

If you're using windows, have you searched the recycle bin? You can undelete it from there (assuming that you're just accidentally deleting it).
My avatar is courtesy of Mellanthe

User avatar
Desichan
Regular
Posts: 40
Joined: Sat Sep 24, 2016 6:02 pm
IRC Nick: Desichan
Tumblr: Desichan
Contact:

Re: Script file is suddenly empty?

#3 Post by Desichan » Sat Oct 29, 2016 10:53 pm

I tried to check that, but that doesn't seem to be the case.

I'm a bit more coherent from all my panicking now, so I'll explain a bit more...

So I tried opening the game, to show a friend, but for some reason, some error popped up, and so I checked into my script... But when I did that, I was treated to a big pile of completely nothing. No words, no code, no anything.

It says the game file updated sometime yesterday, and I know it was working at some point before then. I peeked a bit more, and my .rpyc file, seems to be from nine days ago, so I think I may be able to somehow extract the script from there, but I don't have a clue how, or what even happened.

Thank you very much for your suggestion though, I very much appreciate it.
Image

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Script file is suddenly empty?

#4 Post by indoneko » Sat Oct 29, 2016 11:26 pm

Which one is actually missing? Don't you have something named script.rpy~ in the game directory as a automatic backup to script.rpy ?

As for decompiler/hacking tool for rpyc files, I haven't seen anyone offering it in the forum...
My avatar is courtesy of Mellanthe

User avatar
Desichan
Regular
Posts: 40
Joined: Sat Sep 24, 2016 6:02 pm
IRC Nick: Desichan
Tumblr: Desichan
Contact:

Re: Script file is suddenly empty?

#5 Post by Desichan » Sat Oct 29, 2016 11:32 pm

Hmm I do have the rpy~ file, but I'm not sure what to do with that, I believe it said it updated around the same time as the normal rpy but I could give it a check if there's something I can do with that.

It's not that I'm missing a file, per say, just the entirety of the main script file is completely blank and gone. I don't have a clue how it happened, but somehow between today and yesterday, when I last edited and tested it, it suddenly had no words.
Image

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Script file is suddenly empty?

#6 Post by indoneko » Sat Oct 29, 2016 11:44 pm

It's possible that your HDD has failed and corrupting your files. If I were you, I would start checking the harddisk to see if there's a bad sector or other errors.
My avatar is courtesy of Mellanthe

drKlauz
Veteran
Posts: 237
Joined: Mon Oct 12, 2015 3:04 pm
Contact:

Re: Script file is suddenly empty?

#7 Post by drKlauz » Sun Oct 30, 2016 1:12 am

Google "unrpyc".
If you really can't find tool or use it, send me rpyc, in pm, i will try to decompile it for you.

P.S.: It's not really first time when someone got empty rpy file, probably bug in RenPy building chain or editor.
P.P.S.: What inside rpy~ file? Empty?
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Script file is suddenly empty?

#8 Post by PyTom » Sun Oct 30, 2016 2:11 am

You can also look for the backup in the global saves directory.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Script file is suddenly empty?

#9 Post by Ocelot » Sun Oct 30, 2016 4:33 am

It is late advice, but learn to use versioning system. It is versalite way to collaborate, share code and backup all versions of your work.

If your attempts to do something failed, and in process of doing so you have messed up entire game, you can just revert to last working version, for example.

It might seems complex to set up and it looks like overkill for small projects, but when you will get hang on things, you will just start to use it for everything.
< < insert Rick Cook quote here > >

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Script file is suddenly empty?

#10 Post by Donmai » Sun Oct 30, 2016 11:23 am

Follow Tom's advice. Look for backup copies of your scripts on your system.
https://www.renpy.org/doc/html/config.h ... _directory
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Desichan
Regular
Posts: 40
Joined: Sat Sep 24, 2016 6:02 pm
IRC Nick: Desichan
Tumblr: Desichan
Contact:

Re: Script file is suddenly empty?

#11 Post by Desichan » Sun Oct 30, 2016 11:40 am

Wow, so like thanks everyone for the advice! Finding that global save directory gave me all the stuff in my script I was missing, for the most part.

So I entered that into my script file though, but it gave me an error, even though the script is put into place.
I'll paste what it said, just to see if anyone knows why that'd come up. Either way though, I am super appreciative!


The thing below was followed by like a million squares. But if there's not really a fix, since I have my script, I can just make a completely new game file, probably, so anyway, what I mean to say is thank you so so much, I was freaking out so much yesterday, because I had no clue what to do.

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 1: expected statement.




Edit: Nevermind its fixed, thanks again so so so much! It means the world to me!
Image

Post Reply

Who is online

Users browsing this forum: No registered users