How to store inputtext into variable properly?
#9

You must use dini_Set for setting a string, like this:

Код:
dini_Set(Acc(playerid), "CharacterFirstname", CharacterFirstname[playerid]);
and for reading:

Код:
new buffer[DINI_MAX_FIELD_VALUE];
buffer = dini_Get(Acc(playerid), "CharacterFirstname");

// and after that write the buffer to the Array:
CharacterFirstname[playerid][0] = 0;
strcat(CharacterFirstname[playerid], buffer);
I'm not exactly sure about the buffer size. If "DINI_MAX_FIELD_VALUE" doesn't exist, try 128 or 256.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)