﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 3  » Creating list or vector with numerical values &amp;amp; getting n-th element out of this list </title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 29 Apr 2026 10:57:49 GMT</lastBuildDate><ttl>20</ttl><item><title>Creating list or vector with numerical values &amp;amp; getting n-th element out of this list </title><link>https://forums.millisecond.com/Topic3575.aspx</link><description>
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;Hi everyone,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;I am trying
to expand the source code for the &lt;b&gt;IOWA-Gambling task &lt;/b&gt;available at the Inquisit
website. In this version the loss-values are selected randomly as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&amp;lt;expressions&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;span lang="EN-GB"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;/ getlossdeck1
= noreplace(0, 0, 0, 0, 0, 150, 200, 250, 300, 350)&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&amp;lt;/expressions&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;By contrast,
I want to define a &lt;b&gt;fixed sequence &lt;/b&gt;of loss values for loss values for each trail.
I want to choose the current value depending on how many cards were already
taken from the deck. Speaking more technically - &lt;i&gt;&lt;b&gt;I want to get the nth element
out of an array, vector or list with numerical values.&lt;/b&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;Therefore I
am trying to define something like a list or a vector with loss values (integer
values) for each trail.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;/ loss_deck1
= (0, 0, 0, 0, 0, 150, 200, 250, 300, 350)&lt;span&gt;&amp;nbsp;
&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;Since that
did not work I have defined a counter&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;lt;counter
deck1_loss&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;/ items = (0,
0, 0, 0, 0, 150, 200, 250, 300, 350)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;/ select = sequence(1-10)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&amp;lt;/counter&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;Additionally,
I have introduced a variable "values.cards_deck1" that counts how
often deck1 was chosen. This counter is updated in each trial.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;In the last
step I try to define the loss value for the current trial as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;/ getlossdeck1
= getitem(counter.deck1_loss.items, values.cards_deck1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;But each
time I get the error message "Expression is not valid. Item not found".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;b&gt;Does
someone have an idea whether it is possible to create a list or vector with
numerical values &amp;amp; get back a specific element out of this list?&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;Thanks a
lot for your help in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;Best regards,&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Olga Kunina&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;</description><pubDate>Thu, 09 Oct 2014 04:43:26 GMT</pubDate><dc:creator>Olga Kunina</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic14567.aspx</link><description>No problem. Let me know how it goes!&lt;br/&gt;</description><pubDate>Thu, 09 Oct 2014 04:43:26 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic14566.aspx</link><description>Thanks for this I will give it a hack so to speak &lt;br/&gt;&lt;br/&gt;Apologies for doubling up with PM&lt;br/&gt;</description><pubDate>Thu, 09 Oct 2014 04:37:02 GMT</pubDate><dc:creator>fasteddie9141</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic14565.aspx</link><description>Assuming you did something like&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ getlossdeck1 = sequence(0, 0, 0, 0, 0, 0, 0, 0, 0, 1250)&lt;br/&gt;/ getlossdeck2 = sequence(0, 0, 0, 0, 0, 150, 200, 250, 300, 350)&lt;br/&gt;/ getlossdeck3 = sequence(0, 0, 0, 0, 0, 0, 50, 50, 50, 50)&lt;br/&gt;/ getlossdeck4 = sequence(0, 0, 0, 0, 0, 0, 0, 0, 0, 250)&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;there is no reason why the decks should be "in sync". If e.g. "deck 1" is selected&lt;br/&gt;&amp;lt;trial igt&amp;gt;&lt;br/&gt;...&lt;br/&gt;/ ontrialend = [ if (trial.igt.response == "deck1") {... ; values.loss=expressions.getlossdeck1; ...}]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;A single sample is retrieved from expressions.getlossdeck1. The remaining expressions are (supposed to be) wholly unaffected -- no samples are retrieved.&lt;br/&gt;&lt;br/&gt;The quickest, but somewhat hack-ish, way to change that is to retrieve a sample from *every* expression regardless of the deck chosen:&lt;br/&gt;&lt;br/&gt;&amp;lt;trial igt&amp;gt;&lt;br/&gt;...&lt;br/&gt;/ ontrialend = [ if (trial.igt.response == "deck1") {... ; values.loss=expressions.getlossdeck1; expressions.getlossdeck2; expressions.getlossdeck3; expressions.getlossdeck4;...}]&lt;br/&gt;/ ontrialend = [ if (trial.igt.response == "deck2") {... ; values.loss=expressions.getlossdeck2; expressions.getlossdeck1; expressions.getlossdeck3; expressions.getlossdeck4;...}]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 08 Oct 2014 08:15:25 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic14564.aspx</link><description>Dave&lt;br/&gt;&lt;br/&gt;I know I'm dredging this from the mists of time but I am also trying to do a linear sequence with the iowa gambling task from the web scripts.&lt;br/&gt;&lt;br/&gt;I have used the sequence command to select a fixed loss value and modified other elements of the script so that it only shows one value for loss gain over the card&lt;br/&gt;&lt;br/&gt;Its 90% there but I cannot get the getlossdeck sequence to step together so that it doesn't step back when users select a different response.&lt;br/&gt;&lt;br/&gt;i.e if they keep hitting deck A the cards are in correct sequence but if they change from deck to deck it does the decks in order but not so the sixth card in A leads to the 7th in B etc&lt;br/&gt;&lt;br/&gt;Is there a simple way of explaining your example of counters so that I can get the existing code to step in time so to speak&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I have some code you can look at to see the modifications I've made if it would help&lt;br/&gt;&lt;br/&gt;J</description><pubDate>Wed, 08 Oct 2014 07:47:18 GMT</pubDate><dc:creator>fasteddie9141</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3585.aspx</link><description>&lt;p&gt;You're welcome. BTW, if you're into risk-taking card tasks, definitely check out the &lt;a href="/download/samples/v3/ColumbiaCardTask/default.aspx"&gt;Columbia Card Task&lt;/a&gt; script available from the Inquisit Task Library.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;~Dave&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 15:51:37 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3582.aspx</link><description>&lt;p&gt;Dear Dave,&lt;/p&gt;
&lt;p&gt;thanks for these examples and your answers. They were very helpfull. [:)]&lt;/p&gt;
&lt;p&gt;Have a good weekend. With best wishes,&lt;/p&gt;
&lt;p&gt;Olga&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 08:19:50 GMT</pubDate><dc:creator>Olga Kunina</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3581.aspx</link><description>&lt;p&gt;[quote]Can you tell me how one would have to define "counter.deck", "text.presenteditems", or "item.useritems" so that this function is executed regularely?[/quote]&lt;/p&gt;
&lt;p&gt;Hmm, I don't think there's much more too it. Let's do this by way of an example. Suppose you have defined a counter element:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;counter fruit&amp;gt;&lt;br /&gt;/ items = ("apple", "banana", "cherry", "damson", "elderberry")&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/counter&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now, suppose you want to retrieve the third item from the counter, i.e. "cherry", with the getitem function. You can use that function either by way of the &amp;lt;expressions&amp;gt; element&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;expressions&amp;gt;&lt;br /&gt;/ getcherry = getitem(counter.fruit, 3)&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/expressions&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;or by way of Inquisit's event attributes ('/ onexptbegin', '/ onexptend', '/ onblockbegin', '/ onblockend', '/ ontrialbegin', '/ ontrialend') available at the &amp;lt;expt&amp;gt;, &amp;lt;block&amp;gt; and &amp;lt;trial&amp;gt; level&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;trial getcherry&amp;gt;&lt;br /&gt;/ ontrialbegin = [text.favoritefruit.item.1 = getitem(counter.fruit, 3)]&lt;br /&gt;/ stimulusframes = [favoritefruit]&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/trial&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;text favoritefruit&amp;gt;&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/text&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and do all sorts of things with it, e.g. write it to a &amp;lt;text&amp;gt; element or to a &amp;lt;values&amp;gt; entry. Note that the item index number, i.e. the second argument of the getitem function&amp;nbsp; ( 3 for "cherry") may also be a variable. So you might as well define another &amp;lt;values&amp;gt; entry (or use anything that returns a valid numerical value) and use it as the functions argument:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;values&amp;gt;&lt;br /&gt;/ cherryindex = 3&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/values&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;expressions&amp;gt;&lt;br /&gt;
/ getcherry = getitem(counter.fruit, values.cherryindex)&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/expressions&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best wishes from a fellow Inquisit user,&lt;/p&gt;
&lt;p&gt;~Dave&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 08:10:56 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3580.aspx</link><description>&lt;p&gt;Dear Dave,&lt;/p&gt;
&lt;p&gt;thank you so much for your help. That is indeed a very simple soultion for this probelm.&amp;nbsp;[:D]&lt;/p&gt;
&lt;p&gt;However, we are developing a new card risking task and there it would be helpful to be able to get the n-th element of a counter. Unfortunatelly there are not many examples for the usage of the function getitem in the documentation . &lt;/p&gt;
&lt;p style="padding-left: 60px;"&gt;
                
                    getitem(counter.deck, 1)&lt;br /&gt;
                    getitem(text.presenteditems, text.presenteditems.itemcount)&lt;br /&gt;
                    getitem(item.useritems, item.useritems.itemcount - 1)&lt;/p&gt;
&lt;p&gt;Can you tell me how one would have to define "counter.deck", "text.presenteditems", or "item.useritems" so that this function is executed regularely?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Olga&lt;/p&gt;

</description><pubDate>Fri, 27 Nov 2009 07:43:59 GMT</pubDate><dc:creator>Olga Kunina</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3579.aspx</link><description>&lt;p&gt;Okay, I had a quick look at your script and compared it to the original IGT script available from millisecond.com. Well, if all you want is a fixed sequence of losses for each deck, there's a much easier way to pull this off. In the original script, losses are randomly determined by the following expressions:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;expressions&amp;gt;&lt;br /&gt;/ getlossdeck1 = &lt;b&gt;noreplace&lt;/b&gt;(0, 0, 0, 0, 0, 0, 0, 0, 0, 1250)&lt;br /&gt;/ getlossdeck2 = noreplace(0, 0, 0, 0, 0, 150, 200, 250, 300, 350)&lt;br /&gt;/ getlossdeck3 = noreplace(0, 0, 0, 0, 0, 0, 50, 50, 50, 50)&lt;br /&gt;/ getlossdeck4 = noreplace(0, 0, 0, 0, 0, 0, 0, 0, 0, 250)&lt;br /&gt;&amp;lt;/expressions&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Each time the subject selects e.g. deck1, a random value is returned from expressions.getlossdeck1 (without replacement). Now, if you want to switch that behavior to a predictable, fixed sequence in which certain amounts of losses should occur, you may simply define:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;expressions&amp;gt;&lt;br /&gt;/ getlossdeck1 = &lt;b&gt;sequence&lt;/b&gt;(0, 0, 0, 0, 0, 0, 0, 0, 0, 1250)&lt;br /&gt;/ getlossdeck2 = sequence(0, 0, 0, 0, 0, 150, 200, 250, 300, 350)&lt;br /&gt;/ getlossdeck3 = sequence(0, 0, 0, 0, 0, 0, 50, 50, 50, 50)&lt;br /&gt;/ getlossdeck4 = sequence(0, 0, 0, 0, 0, 0, 0, 0, 0, 250)&lt;br /&gt;&amp;lt;/expressions&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I.e.only when the subject selects deck1 for the tenth time, a loss of 1250 will occur. No further changes are necessary as you can see from the attached script.&lt;/p&gt;
&lt;p&gt;Let me know if that helps,&lt;/p&gt;
&lt;p&gt;~Dave&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 07:23:17 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3578.aspx</link><description>&lt;p&gt;[quote]&amp;nbsp;Unfortunately
it does not work. It seems to be a problem with the expression "getitem(counter.deck1_loss,
values.cards_deck1)".[/quote]&lt;/p&gt;
&lt;p&gt;What exactly isn't working?&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 06:54:22 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3577.aspx</link><description>&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;Hi Dave,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;thank you
very much for your quick answer.&amp;nbsp;&lt;o:p&gt; &lt;/o:p&gt;I have
followed your suggestions and&lt;span&gt; changed my code as follows: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;" class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;lt;trial
igtfeedback&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;" class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;nbsp; / ontrialbegin
= [ if (trial.igt.response == "deck1") { [..]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;" class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.loss
= getitem(counter.deck1_loss, values.cards_deck1); [..] }]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;" class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;lt;/trial&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;Unfortunately
it does not work. It seems to be a problem with the expression "getitem(counter.deck1_loss,
values.cards_deck1)".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;I have
uploaded the script. Thanks a lot for taking time to answer the questions,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Best regards,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Olga&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 06:48:00 GMT</pubDate><dc:creator>Olga Kunina</dc:creator></item><item><title>RE: Creating list or vector with numerical values &amp;amp; getting n-th element out of this list</title><link>https://forums.millisecond.com/Topic3576.aspx</link><description>&lt;p&gt;Hmm, glancing over the code you posted, I think&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-GB"&gt;/ getlossdeck1
= getitem(counter.deck1_loss.items, values.cards_deck1)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-GB"&gt;should be changed to a /ontrialend or /ontrialbegin expression:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;values&amp;gt;&lt;br /&gt;/ getlossdeck1 = 0&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/values&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and then&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;trial sometrial&amp;gt;&lt;br /&gt;/ ontrialbegin = [values.getlossdeck1=getitem(counter.deck1_loss, values.cards_deck1]&lt;br /&gt;[...]&lt;br /&gt;&amp;lt;/trial&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-GB"&gt;If that doesn't do the trick, you might want to attach your script to this thread (-&amp;gt; see 'Options' tab when posting a reply). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-GB"&gt;~Dave&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>Fri, 27 Nov 2009 06:04:50 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>