Tablist dialogs: only part of text is passed as inputtext - 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: Tablist dialogs: only part of text is passed as inputtext (
/showthread.php?tid=574174)
Tablist dialogs: only part of text is passed as inputtext -
dusk - 14.05.2015
Example dialog:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST, "Hello, this is dialog", "Cl1rw1\tcl2rw1\ncl1rw2\tcl2rw2", "Yes", "no");
If I select the first option, OnDialogResponse argument inputtext has the value "Cl1rw1", which is everything before the tab character.
Or was this made purposely and it's my own fault that I rely on it?
EDIT: Although I didn't test I assume the same issue exists for TABLIST HEADER dialogs.
Re: Tablist dialogs: only part of text is passed as inputtext -
kurta999 - 14.05.2015
Comfirmed.... This is very shit idea.
Re: Tablist dialogs: only part of text is passed as inputtext -
ikkentim - 14.05.2015
Why is this a big deal? You get the index of the selected row anyways.
Re: Tablist dialogs: only part of text is passed as inputtext -
dusk - 14.05.2015
Quote:
Originally Posted by ikkentim
Why is this a big deal? You get the index of the selected row anyways.
|
Well from time to time I find myself in a need to pass something as the text. I mean I format something as the body of the dialog and then I extract it later. Ofcourse this probably isn't good practice... But when you have a list of fifty or so items and dozens of dialogs like this, it gets annoying to store the data in some array that maps from listitem to that value.
Re: Tablist dialogs: only part of text is passed as inputtext -
Lordzy - 15.05.2015
It's confirmed, inputtext will store first column's text only. You'll either have to store the complete data in an array or wait for it to get fixed (in case if it's not meant to be like this).