SA-MP Forums Archive
String not Saving? y_ini - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: String not Saving? y_ini (/showthread.php?tid=474584)



String not Saving? y_ini | Rep++ - Mr.Faqahat - 08.11.2013

PHP код:
if(dialogid == Dialog_37)
    {
        if(
response)
        {
             new 
name[24];
            
GetPlayerName(playeridnamesizeof(name));
            
SendClientMessage(playerid0xFFFF00AA"Thanks for finishing this operation the Email should be sent!");
            
printf("%s has completed his registration! %s "nameinputtext);
            
format(Jfile100ACCOUNTS_PATHGetName(playerid));
            new 
INI:ACCOUNT INI_Open(Jfile);
              
INI_WriteString(ACCOUNT"Email"inputtext);
          } 
Whats the mistake im new to y_ini its actually not saving the string


Re: String not Saving? y_ini - Tagathron - 08.11.2013

Try setting an tag to write to first.
Код:
INI_SetTag(File which you're setting tag to, Tag name);



Re: String not Saving? y_ini - Mr.Faqahat - 08.11.2013

Quote:
Originally Posted by Tagathron
Посмотреть сообщение
Try setting an tag to write to first.
Код:
INI_SetTag(File which you're setting tag to, Tag name);
Nop didnt worked


Re: String not Saving? y_ini - Mr.Faqahat - 09.11.2013

Help?


Re: String not Saving? y_ini - DobbysGamertag - 09.11.2013

Have you attempted to format a string before inserting it?

pawn Код:
new name[24],string[100];
            GetPlayerName(playerid, name, sizeof(name));
            SendClientMessage(playerid, 0xFFFF00AA, "Thanks for finishing this operation the Email should be sent!");
            printf("%s has completed his registration! %s ", name, inputtext);
            format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
            new INI:ACCOUNT = INI_Open(Jfile);
            format(string,100,"%s",inputtext);
            INI_WriteString(ACCOUNT, "Email", string);
Pretty much the same way i used to add emails when i used y_ini.


Re: String not Saving? y_ini - Mr.Faqahat - 09.11.2013

Quote:
Originally Posted by DobbysGamertag
Посмотреть сообщение
Have you attempted to format a string before inserting it?

pawn Код:
new name[24],string[100];
            GetPlayerName(playerid, name, sizeof(name));
            SendClientMessage(playerid, 0xFFFF00AA, "Thanks for finishing this operation the Email should be sent!");
            printf("%s has completed his registration! %s ", name, inputtext);
            format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
            new INI:ACCOUNT = INI_Open(Jfile);
            format(string,100,"%s",inputtext);
            INI_WriteString(ACCOUNT, "Email", string);
Pretty much the same way i used to add emails when i used y_ini.
I see but Still nothing =( not working


Re: String not Saving? y_ini - Mr.Faqahat - 09.11.2013

Help?


Re: String not Saving? y_ini - Emmet_ - 09.11.2013

You need to close the file to save the data.

pawn Код:
if(dialogid == Dialog_37)
    {
        if(response)
        {
            new name[24];
            GetPlayerName(playerid, name, sizeof(name));
            SendClientMessage(playerid, 0xFFFF00AA, "Thanks for finishing this operation the Email should be sent!");
            printf("%s has completed his registration! %s ", name, inputtext);
            format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
            new INI:ACCOUNT = INI_Open(Jfile);
            INI_WriteString(ACCOUNT, "Email", inputtext);
            INI_Close(ACCOUNT);
        }
    }



Re: String not Saving? y_ini - Mr.Faqahat - 09.11.2013

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
You need to close the file to save the data.

pawn Код:
if(dialogid == Dialog_37)
    {
        if(response)
        {
            new name[24];
            GetPlayerName(playerid, name, sizeof(name));
            SendClientMessage(playerid, 0xFFFF00AA, "Thanks for finishing this operation the Email should be sent!");
            printf("%s has completed his registration! %s ", name, inputtext);
            format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
            new INI:ACCOUNT = INI_Open(Jfile);
            INI_WriteString(ACCOUNT, "Email", inputtext);
            INI_Close(ACCOUNT);
        }
    }
no Bro Still not working