String not Saving? y_ini
#1

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
Reply
#2

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

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
Reply
#4

Help?
Reply
#5

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.
Reply
#6

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
Reply
#7

Help?
Reply
#8

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);
        }
    }
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)