PDA

View Full Version : tracking problem


Boyka96
16/05/2015, 07:41 PM
Hii .. it's a little bit hard to explain, so I'll do my best and please if you dont understand comment and I'll try to explain more.
While making a system I came to a point where I have to list items from a Database table collumn into a Dialog (type list) then I need to react depending on which item the player has choosen .. the problem is that all I still have in OnDialogResponse is the index of the choosen dialog item (listitem) .. if someone have an idea .. please post it .. if you dont understand something please post and I'll try to explain more.
I thought of creating an array at the time of showing the dialog and save the primary keys on it in the order of apparition but the problem I was facing is the size of this array .. I also believe there is an easier way as I saw this working perfectly in other servers.
Thanks

Konstantinos
16/05/2015, 07:47 PM
You get the listitem and the inputtext. I'm sure those two are enough.

Can you describe what's the problem and what you're trying to do so we'll be able to help you more?

Boyka96
16/05/2015, 07:51 PM
the listitem is the index of the dialog item .. what I need to know is which line of the database the player selected as the dialog list items are fetched from the database.
Edit: also there is no inputtext in a dialog list

Konstantinos
16/05/2015, 07:56 PM
What do you mean by "which line of the database"?

If you show 25 items and the player selected the 10th, then you know which row they selected.

Boyka96
16/05/2015, 08:02 PM
What do you mean by "which line of the database"?

If you show 25 items and the player selected the 10th, then you know which row they selected.
then I know that he selected the item which index is 9 from the dialog list .. not the Row related to that item in the database table I fetched these items from when showing the dialog.. you see what I mean ?

Konstantinos
16/05/2015, 08:07 PM
Everytime you select a listitem, inputtext holds the text of that index.

I cannot understand you very well, an example of code would be a good start as I'm not aware of what you actually load from the database (name, ids etc).

Boyka96
16/05/2015, 08:15 PM
Everytime you select a listitem, inputtext holds the text of that index.

That's the information I needed .. thanks +rep

Boyka96
16/05/2015, 11:34 PM
Update: it worked .. I edited the items so they contain the Row ID then I used string functions to retrieve it back from inputtext.. thanks for giving me the key Konstantinos .. You always do it :D