SA-MP Forums Archive
Dialogs and strings - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialogs and strings (/showthread.php?tid=211238)



Dialogs and strings - Ice-cup - 14.01.2011

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.


Re: Dialogs and strings - DeadAhead - 14.01.2011

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))


Re: Dialogs and strings - Ice-cup - 14.01.2011

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


Re: Dialogs and strings - ғαιιοцт - 14.01.2011

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


Re: Dialogs and strings - Ice-cup - 15.01.2011

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).


Re: Dialogs and strings - Ice-cup - 16.01.2011

Still nothing, please anyone help me .