"Unexpected error when running the game" Hitskin_logo Hitskin.com

Ceci est une prévisualisation d'un thème de Hitskin.com
Installer le thèmeRetourner sur la fiche du thème



AccueilAccueil  FAQFAQ  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  
-21%
Le deal à ne pas rater :
Drone Dji Mini 2 SE Gris
219.99 € 279.99 €
Voir le deal

 

 "Unexpected error when running the game"

Aller en bas 
4 participants
AuteurMessage
Mass
*Excellent utilisateur*
Mass


Messages : 3351
Localisation : Dans une canonnière wookie.
Projet Actuel : Monter des trucs et des machins

"Unexpected error when running the game" Empty
MessageSujet: "Unexpected error when running the game"   "Unexpected error when running the game" EmptyLun 29 Sep 2008 - 22:59

Bonjour à tous,
je sais, j'ai beaucoup besoin d'aide en ce moment.
J'ai fait un script avec des bouts de code de Nicoulas et M@ad_doc, mais j'ai un bug. Pas genre un message d'erreur bien moche, mais mon pire cauchemard, c'est à dire "Unexpected error when running the game". Je ne l'aime pas parce qu'il donne aucune info, et c'est bien relou, parce que moi ben je sais pas d'où ça vient... :snif2:
En fait, il est censé prendre la première adresse (en haut) d'un fichier texte list.txt, de mettre le code source dans un fichier html (aménagement des noms by Nicoulas super ), de supprimer la ligne éxécutée (script by M@d_Doc super ) et de passer à la suivante grâce à une boucle. Seulement, quand il en a fait 4-5, il m'affiche "Unexpected error when ****************" <==vous connaaissez la suite.
Donc voilà mon code en couleur puis pas en couleur parce que je crois que ça supprime des bouts (dam en avait fait l'expérience si je me rapelle bien) :

trait_list a écrit:
global.listread = file_text_open_read("list.txt");
global.adresssite = file_text_read_string(global.listread);
file_text_close(global.listread);
if (global.adresssite != "")
{
//Récupération du code source
global.codesource = external_call(global.dllNetRead_Read,global.adresssite);

//Traitement du nom de fichier
str = global.fichname;
repeat(string_count("/",str))
{
pos = string_pos("/",str);
str = string_delete(str,pos,1);
}
repeat(string_count(":",str))
{
pos = string_pos(":",str);
str = string_delete(str,pos,1);
}
repeat(string_count("\",str))
{
pos = string_pos("\",str);
str = string_delete(str,pos,1);
}
repeat(string_count("=",str))
{
pos = string_pos("=",str);
str = string_delete(str,pos,1);
}
repeat(string_count("+",str))
{
pos = string_pos("+",str);
str = string_delete(str,pos,1);
}
repeat(string_count("-",str))
{
pos = string_pos("-",str);
str = string_delete(str,pos,1);
}
repeat(string_count("/",str))
{
pos = string_pos("=",str);
str = string_delete(str,pos,1);
}
global.fichname = str;

//Ajout de l'extention
global.fichname = global.fichname + ".htm";

//Changement nom de fichier (modif temporaire)
//global.fichname = get_string("Tapez le nom du fichier","httpwww.monsite.com.htm");

//Récupération de la redirection
redir1id = file_text_open_read("redir1.txt");
redir1 = file_text_read_string(redir1id);
file_text_close(redir1id);

redir2id = file_text_open_read("redir2.txt");
redir2 = file_text_read_string(redir2id);
file_text_close(redir2id);

redir3id = file_text_open_read("redir3.txt");
redir3 = file_text_read_string(redir3id);
file_text_close(redir3id);

//Préparation du code source définitif
global.excodesource = global.codesource;
global.codesource = redir1 + global.adresssite + redir2 + global.adresssite + redir3 + global.codesource;

//Ecriture du fichier
fich = file_text_open_write(global.fichname);
file_text_write_string(fich,global.codesource);
file_text_close(fich);

//Suppression de l'adresse de list.txt
a = file_text_open_read("list.txt");
file_text_readln(a);
text = "";
while !file_text_eof(a)
{
text += file_text_read_string(a)+"
"
file_text_readln(a)
}
file_text_close(a);
file_delete("list.txt");
global.listwrite = file_text_open_write("list.txt");
file_text_write_string(global.listwrite,text);
file_text_close(global.listwrite);
script_execute(trait_list)

}
else
{
show_message("Indexation terminée");
}

trait_list a écrit:
global.listread = file_text_open_read("list.txt");
global.adresssite = file_text_read_string(global.listread);
file_text_close(global.listread);
if (global.adresssite != "")
{
//Récupération du code source
global.codesource = external_call(global.dllNetRead_Read,global.adresssite);

//Traitement du nom de fichier
str = global.fichname;
repeat(string_count("/",str))
{
pos = string_pos("/",str);
str = string_delete(str,pos,1);
}
repeat(string_count(":",str))
{
pos = string_pos(":",str);
str = string_delete(str,pos,1);
}
repeat(string_count("\",str))
{
pos = string_pos("\",str);
str = string_delete(str,pos,1);
}
repeat(string_count("=",str))
{
pos = string_pos("=",str);
str = string_delete(str,pos,1);
}
repeat(string_count("+",str))
{
pos = string_pos("+",str);
str = string_delete(str,pos,1);
}
repeat(string_count("-",str))
{
pos = string_pos("-",str);
str = string_delete(str,pos,1);
}
repeat(string_count("/",str))
{
pos = string_pos("=",str);
str = string_delete(str,pos,1);
}
global.fichname = str;

//Ajout de l'extention
global.fichname = global.fichname + ".htm";

//Changement nom de fichier (modif temporaire)
http://global.fichname = get_string("Tapez le nom du fichier","httpwww.monsite.com.htm");

//Récupération de la redirection
redir1id = file_text_open_read("redir1.txt");
redir1 = file_text_read_string(redir1id);
file_text_close(redir1id);

redir2id = file_text_open_read("redir2.txt");
redir2 = file_text_read_string(redir2id);
file_text_close(redir2id);

redir3id = file_text_open_read("redir3.txt");
redir3 = file_text_read_string(redir3id);
file_text_close(redir3id);

//Préparation du code source définitif
global.excodesource = global.codesource;
global.codesource = redir1 + global.adresssite + redir2 + global.adresssite + redir3 + global.codesource;

//Ecriture du fichier
fich = file_text_open_write(global.fichname);
file_text_write_string(fich,global.codesource);
file_text_close(fich);

//Suppression de l'adresse de list.txt
a = file_text_open_read("list.txt");
file_text_readln(a);
text = "";
while !file_text_eof(a)
{
text += file_text_read_string(a)+"
"
file_text_readln(a)
}
file_text_close(a);
file_delete("list.txt");
global.listwrite = file_text_open_write("list.txt");
file_text_write_string(global.listwrite,text);
file_text_close(global.listwrite);
script_execute(trait_list)

}
else
{
show_message("Indexation terminée");
}

Je sais, c'est du bricolage, mais si vous avez des idées, n'hésitez pas.
J'ai rempacé le # de M@d_doc par un retour à la ligne classique parce que sinon mes noms de fichiers étaient avec des # et vive les bugs tord .
Merci d'avance de vos réponses hap

Alala, max et ses idées à la noix
Revenir en haut Aller en bas
http://madmass.mype.fr/CBNA/
Mass
*Excellent utilisateur*
Mass


Messages : 3351
Localisation : Dans une canonnière wookie.
Projet Actuel : Monter des trucs et des machins

"Unexpected error when running the game" Empty
MessageSujet: Re: "Unexpected error when running the game"   "Unexpected error when running the game" EmptyMar 30 Sep 2008 - 19:33

En réponse à bacachou, le truc est censé récupérer la première adresse web, enregistrer son code source + redirection dans un fichier portant le nom de l'adresse + htm - les / et autre. Après, le script_execute(), c'est pour qu'il recommence une fois fini. Et il recommence pas si adresssite = "", c'est à dire rien. happy1
Revenir en haut Aller en bas
http://madmass.mype.fr/CBNA/
Mass
*Excellent utilisateur*
Mass


Messages : 3351
Localisation : Dans une canonnière wookie.
Projet Actuel : Monter des trucs et des machins

"Unexpected error when running the game" Empty
MessageSujet: Re: "Unexpected error when running the game"   "Unexpected error when running the game" EmptyMer 1 Oct 2008 - 9:57

no idea ? snif
Revenir en haut Aller en bas
http://madmass.mype.fr/CBNA/
jo
*Excellent utilisateur*
jo


Messages : 4879
Localisation : CENSURE T_T
Projet Actuel : FAC

"Unexpected error when running the game" Empty
MessageSujet: Re: "Unexpected error when running the game"   "Unexpected error when running the game" EmptyMer 1 Oct 2008 - 14:06

stun gros tas de code, avec des fonctions qui font souvent appel a des variables externes etc, faut trouver un gars motiver, taura pas ta reponse tout de suite (sauf si ta du bol xD)

anyway, dsl si je t'ai donné le faux espoir d'une reponse
Revenir en haut Aller en bas
http://psyckho.skyrock.com/
Wargamer
*Excellent utilisateur*
Wargamer


Messages : 6938
Projet Actuel : Bataille de cake au fruits

"Unexpected error when running the game" Empty
MessageSujet: Re: "Unexpected error when running the game"   "Unexpected error when running the game" EmptyJeu 2 Oct 2008 - 2:55

trop court, recommence mais avec plus de couleurs noel
mais jo a tout dit, faut vraiment être motivé pour écrire le code, et encore plus pour le modifier
Revenir en haut Aller en bas
Levans
Utilisateur confirmé: Rang *****
Levans


Messages : 1598
Localisation : France -> Île de France -> Essonne -> Gif sur Yvette

"Unexpected error when running the game" Empty
MessageSujet: Re: "Unexpected error when running the game"   "Unexpected error when running the game" EmptyJeu 2 Oct 2008 - 7:13

jo a écrit:
stun gros tas de code, avec des fonctions qui font souvent appel a des variables externes etc, faut trouver un gars motiver, taura pas ta reponse tout de suite (sauf si ta du bol xD)

En effet, désolé si je te tonne pas une réponse, mais essayes un truc : à la fin de ton script, (avant qu'il ne se relance) affiches un message qui contient les valeurs de test variables, ainsi tu pourra les suivre et comprendre où ça plante, très souvent, ça sauve tout.
Revenir en haut Aller en bas
Contenu sponsorisé





"Unexpected error when running the game" Empty
MessageSujet: Re: "Unexpected error when running the game"   "Unexpected error when running the game" Empty

Revenir en haut Aller en bas
 
"Unexpected error when running the game"
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Erreur : "error occured while running the game"
» ! unexpected error
» Unexpected error... d'un pc à l'autre ?
» [solution unexpected error]
» [Résolu]Au Secours. unexpected error

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum Le CBNA :: Développement :: Entraide débutants-
Sauter vers: