Code: Select all
_history_list[-1].what #I think this saves the dialogs.
python:
try: renpy.file(config.basedir + "/English_correction.txt")
except: open(config.basedir + "/English_correction.txt", "wb").write(renpy.file("English_correction.txt").read())
##############
Thanks to a friend you can get the following, and I want to share it if you are interested, this consists of placing a small button next to the dialog to report bad translations of the game, the active dialog is sent to a server created in
https://www.000webhost.com/?__cf_chl_js ... Puh5O4p-Mk
in this a .php file is created in the public_html folder and the following code is placed.
Code: Select all
<?php
$txt = htmlspecialchars($_POST['txt']);
$lang = htmlspecialchars($_POST['lang']);
$user = htmlspecialchars($_POST['user']);
if ($lang === "english") {
$myfile = fopen("../errors_english.txt", "a");
} elseif ($lang === "francais") {
$myfile = fopen("../errors_francais.txt", "a");
} elseif ($lang === "portugues") {
$myfile = fopen("../errors_portugues.txt", "a");
} else {
$myfile = fopen("../errors_espanol.txt", "a");
}
fwrite($myfile, $user.":".$txt."\n");
fclose($myfile);you put this code there, with the link of your server.
And the name of the PHP file that you created in the same link
Code: Select all
init python:
from urllib import urlencode
from urllib2 import urlopen
if not persistent.user:
import uuid
persistent.user = str(uuid.uuid4())[:10]
def report_error(txt):
data = {}
data["lang"] = _preferences.language
data["txt"] = txt
data["user"] = persistent.user
data = urlencode(data)
try:
urlopen("http://your_server.000webhostapp.com/filename.php", data=data, timeout=10)
except:
passCode: Select all
screen say(who, what):
style_prefix "say"
vbox:
align (1.0, 1.0)
imagebutton idle ("tra_ground") action [Function(report_error, what), Play("sound","gui/sonido1/boton_1.mp3")] hover("tra_hover")
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"