[SOLVED] I cannot get a random line of a table

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Besically ZP isn't able to take a line from or I am doing something wrong.

I am trying to get 5 random elements from a table that is 7 lines long.

1) bind_to_file
2) table_processing - random line - to variables

Then I repeat this 5 times in order to get 5 elements.

Then I get message:
"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Please attach sample to reproduce.
 
  • Спасибо
Реакции: Stroks

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
I found al alternative way but the bug is still here.

The bug only occurs when the first taking_line table_processing is set to random. If a specific number is add, everything works fine, even following taking_line table_processing is set to random.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
  • Спасибо
Реакции: Stroks

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
...
 

Вложения

  • 17,5 КБ Просмотры: 323

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Works fine by my side
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)