Dialogs and strings
#1

Yo guys I got this:

Код:
        format(regstring, sizeof(regstring), "You've accepted the rules, thanks!.\n Now please fill in a middle name for your character.\n If you don't got one, leave it empty.");
		ShowPlayerDialog(playerid, REGISTER_DIALOG+7,DIALOG_STYLE_INPUT,"Choose a middlename", regstring, "Submit", "Cancel (kick)");
When submitted it does this:

PlayerInfo[playerid][mname] = strlen(inputtext);

This however does not work. Instead of a proper middle name it comes up with a weird symbol.
I've tried it with strval aswell (just to make sure the inputtext isn't an integer) but that didn't work either.
Reply
#2

Well just to clear 3 things up: strlen Gets the length of a string. So you are setting it to a integer.

2) PlayerInfo[playerid][mname] Is a Integer as far as i see (mname is), in the enum line add a [45] by the mname.

new "3)" = "" (there is no 3))
Reply
#3

Both tried the new mname[45] with strlen and strval.
Still not working .
Reply
#4

Remove strlen, also don't use strval, and add something like [MAX_PLAYER_NAME] to the enum like deadahead said.
Reply
#5

Now I got:

mname[MAX_PLAYER_NAME],
in the enum.
And this in the dialogid:

PlayerInfo[playerid][mname] = inputtext[playerid];

Altough this will only get me the first character of the string.
( in the account.ini thing:
mname=C).
Reply
#6

Still nothing, please anyone help me .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)