Sla ha scritto:invece le altre info le avevi eccome-.
Evento create,obj_standard, è già qualcosa.
Action number 1: o è un'icona per aprire dei file oppure è uno script.
Insomma posta ilcontenuto dello script o le icone che hai usato nell'evento create.
C'è sempre una causa.
Lo script è richiamato da questo pezzo di codice (Ho controllato i percorsi e sono tutti giusti (funzionano anche con altri oggetti e drawandoli sono perfetti)
Codice: Seleziona tutto
profile_path_dat=working_directory+"\data\dat1.thi"; profile_path_ext=working_directory+"\data\ext1.thi";
profile_path_dat_t=temp_directory+"\dat1.thi"; profile_path_ext_t=temp_directory+"\ext1.thi";
script_execute(scr_load_play,profile_path_dat,profile_path_dat_t,profile_path_ext,profile_path_ext_t,1,profile_path_res,profile_path_res_t);
script_execute(scr_save_ingame,profile_path_dat,profile_path_dat_t,profile_path_ext,profile_path_ext_t,1,profile_path_res,profile_path_res_t);
I path che finiscono in _t sono le copie temporanee dei file originali, servono per decriptarli/criptarli in una cartella temporanea.
I 2 script chiamati sono questi
(Non scrivo i pezzi di codice relativi a altri salvataggi e caricamenti che funzionano)
Codice: Seleziona tutto
{
// CARICA
var path_a,path_b,subcat_index;
subcat_index=0;
switch(random_a)
{
case 1: {
path_a=argument5+"11.thi"; path_b=argument6+"11.thi";
file_copy(path_a,path_b);
script_execute(scr_cr,path_b,"codicecriptaggioqui");
file=file_text_open_read(path_b);
giocate_cat=file_text_read_real(file); file_text_readln(file);
esatte_cat= file_text_read_real(file); file_text_readln(file);
while (file_text_eof(file))
{
subcat_index+=1;
giocate_subcat[subcat_index]=file_text_read_real(file); file_text_readln(file);
esatte_subcat[subcat_index]=file_text_read_real(file); file_text_readln(file);
}
break;
}
case 2: {
path_a=argument5+"21.thi"; path_b=argument6+"21.thi";
file_copy(path_a,path_b);
script_execute(scr_cr,path_b,"codicecriptaggioqui");
file=file_text_open_read(path_b);
giocate_cat=file_text_read_real(file); file_text_readln(file);
esatte_cat= file_text_read_real(file); file_text_readln(file);
while (file_text_eof(file))
{
subcat_index+=1;
giocate_subcat[subcat_index]=file_text_read_real(file); file_text_readln(file);
esatte_subcat[subcat_index]=file_text_read_real(file); file_text_readln(file);
}
break;
}
}
file_text_close(file);
file_delete(path_b);
}
Codice: Seleziona tutto
{
// SALVA
var path_a,path_b,subcat_index;
subcat_index=0;
switch(random_a)
{
case 1: {
path_a=argument5+"11.thi"; path_b=argument6+"11.thi";
file_copy(path_a,path_b);
script_execute(scr_cr,path_b,"codice");
file=file_text_open_write(path_b);
file_text_write_string(file,string(giocate_cat)); file_text_writeln(file);
file_text_write_string(file,string(esatte_cat)); file_text_writeln(file);
while (random_b!=subcat_index)
{
file_text_write_string(file,string(giocate_subcat[subcat_index])); file_text_writeln(file);
file_text_write_string(file,string(esatte_subcat[subcat_index])); file_text_writeln(file);
subcat_index+=1;
}
file_text_write_string(file,string(giocate_subcat[subcat_index+1])); file_text_writeln(file);
file_text_write_string(file,string(giocate_subcat[subcat_index+1])); file_text_writeln(file);
sub_cat_index+=1;
while (file_text_eof(file))
{
file_text_write_string(file,string(giocate_subcat[subcat_index])); file_text_writeln(file);
file_text_write_string(file,string(esatte_subcat[subcat_index])); file_text_writeln(file);
subcat_index+=1;
}
break;
}
case 2: {
path_a=argument5+"21.thi"; path_b=argument6+"21.thi";
file_copy(path_a,path_b);
script_execute(scr_cr,path_b,"codice");
file=file_text_open_write(path_b);
file_text_write_string(file,string(giocate_cat)); file_text_writeln(file);
file_text_write_string(file,string(esatte_cat)); file_text_writeln(file);
while (random_b!=subcat_index)
{
file_text_write_string(file,string(giocate_subcat[subcat_index])); file_text_writeln(file);
file_text_write_string(file,string(esatte_subcat[subcat_index])); file_text_writeln(file);
subcat_index+=1;
}
file_text_write_string(file,string(giocate_subcat[subcat_index+1])); file_text_writeln(file);
file_text_write_string(file,string(giocate_subcat[subcat_index+1])); file_text_writeln(file);
sub_cat_index+=1;
while (file_text_eof(file))
{
file_text_write_string(file,string(giocate_subcat[subcat_index])); file_text_writeln(file);
file_text_write_string(file,string(esatte_subcat[subcat_index])); file_text_writeln(file);
subcat_index+=1;
}
break;
}
file_text_close(file);
file_delete(path_b);
file_delete(argument6);
}
}