My uh... "script" broke.

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
Hashi
Newbie
Posts: 4
Joined: Sun Apr 08, 2018 9:42 am
Contact:

My uh... "script" broke.

#1 Post by Hashi »

I saved my script but when i came back to it,something bad heppened...

it had chinese(?) letters all over and was covered with the words NUL and STX.

I dont know what i did, but it destroyed my entire visual novel. Does anyone know what happened?

oh and when i try copying my script, editra crashes.

this is how my script looks like:
https://sta.sh/01wz7zbacll5

update: this is my traceback error when i try to copy the text:

#---- System Information ----#
Editra Version: 0.6.99
Operating System: Windows NT 6.1 (build 7601, Service Pack 1)
Python Version: 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
wxPython Version: 2.8.12.1 (msw-unicode)
wxPython Info: (__WXMSW__, wxMSW, unicode, wx-assertions-on, SWIG-1.3.29)
Python Encoding: Default=ascii File=mbcs
wxPython Encoding: cp1252
System Architecture: 32bit AMD64
Byte order: little
Frozen: False
#---- End System Information ----#

#---- Traceback Info ----#
*** Sun Apr 08 15:44:25 2018 ***
Traceback (most recent call last):
File "C:\Users\Name\Downloads\renpy-6.99.14.1-sdk\editra\Editra\src\ed_main.py", line 1162, in DispatchToControl
start, end = has_focus.GetSelection()
File "C:\Users\Name\Downloads\renpy-6.99.14.1-sdk\editra\Editra\src\ed_basestc.py", line 1093, in GetSelection
end = len(utf8_txt[0:end].decode('utf-8'))
File "c:\Python27\lib\encodings\utf_8.py", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd9 in position 0: invalid continuation byte


*** Sun Apr 08 16:20:03 2018 ***
Traceback (most recent call last):
File "C:\Users\Name\Downloads\renpy-6.99.14.1-sdk\editra\Editra\src\ed_main.py", line 1162, in DispatchToControl
start, end = has_focus.GetSelection()
File "C:\Users\Name\Downloads\renpy-6.99.14.1-sdk\editra\Editra\src\ed_basestc.py", line 1091, in GetSelection
start = len(utf8_txt[0:start].decode('utf-8'))
File "c:\Python27\lib\encodings\utf_8.py", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd9 in position 0: invalid continuation byte

#---- End Traceback Info ----#
Last edited by Hashi on Sun Apr 08, 2018 10:30 am, edited 2 times in total.

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: My uh... "script" broke.

#2 Post by rayminator »

you might have opened the wrong file there are two types of files in your game folder

like this

script.rpy
script.rpyc

might sure you open rpy file.

User avatar
Hashi
Newbie
Posts: 4
Joined: Sun Apr 08, 2018 9:42 am
Contact:

Re: My uh... "script" broke.

#3 Post by Hashi »

I opened .rpy so i dont think thats the problem. Also quick update, i cant delete that stuff on the file.

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: My uh... "script" broke.

#4 Post by Karl_C »

Can you try to open your script in MS-Windows built-in editor ('notepad')?

If it looks normal, then: "Save as", "Encoding", "UTF-8"

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

Re: My uh... "script" broke.

#5 Post by Ocelot »

This looks like a corrupted file. I hope you did backups.

If not, there still is transient chance to save your data:

Got to the %AppData%/RenPy/backups/<YOUR PROJECT>/ directory. There should be one or more files named script.<LOTS OF LETTERS AND NUMBERS>.rpy. Check them. If any contains your undamaged script, you are in luck. Copy it to your normal project folde overwriting damaged file.

For the future: Never have only one copy of anything. Copy anything you care about somewhere else. A flash drive or exteral hard drive is a perfect place. Do it regularly. Treat any file on any medium as if it can disappear at any moment.
< < insert Rick Cook quote here > >

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: My uh... "script" broke.

#6 Post by kivik »

Further to Ocelot's advice, if you're using a Mac, you can create a script to rsync your game folder to a remote location. Rsync is great because it just checks the difference between your source and destination folder and only write the changes (you can also tell it to delete any files that aren't at source location anymore).

Windows doesn't have rsync but you can google for tools that do something similar.

You can then use Google Drive, Dropbox or Mega to sync the files at your remote location online - meaning you'll have two backups!

Another thing you could do as well is to look up Git, which allows you to commit codes to a repository when it's in a stable state (you decide when stable is). You can roll back to previous versions as well. It's typically command line, but GitHub and Git Lab offer GUI clients that takes the pain away. Only thing is I think you have to pay for them to keep your code private.


Hope you manage to recover your script from the suggestions above!

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
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: My uh... "script" broke.

#7 Post by Donmai »

Looks like abandonware Editra made another victim. Editra users should at least give Atom a try.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: My uh... "script" broke.

#8 Post by rayminator »

Donmai wrote: Sun Apr 08, 2018 8:55 pm Looks like abandonware Editra made another victim. Editra users should at least give Atom a try.
agreed

Editra last update was

VERSION 0.7.20
DATE 01/05/2013

the more updates you get for your OS the software will become unstable for that platform

i will suggest that you find another text editor like atom but for atom i suggest that you download the standalone copy and download language-renpy

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]