# 2 values 1 var

**URL:** https://forum.kirupa.com/t/2-values-1-var/331307
**Category:** flash
**Created:** [July 3, 2013, 5:44pm UTC](https://forum.kirupa.com/t/2-values-1-var/331307 "2013-07-03T17:44:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dasLuft](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@dasLuft](https://forum.kirupa.com/u/dasLuft)
#### Post date: [July 3, 2013, 5:44pm UTC](https://forum.kirupa.com/t/2-values-1-var/331307/1 "2013-07-03T17:44:15Z")

</div>

Hi! I’m working on a game where the player goes around picking stuff up and giving it to other characters.So I have this var theItem that is the item currently selected in the players inventory and on the characters I have the var questItem and when you get in range of the character and press space I check if theItem == questItem and stuff happens.  
My problem is I can’t get questItem to be either e.g. “glasses” or “coin”.  
Here is my fail:

**var iWant = new Array(“glasses”, “coin”);**

**for (i = 0; i \< iWant.length; ++i)**  
**{**  
\*\* this.questItem = iWant\*;\*\*  
\*\* trace(iWant\*);\*\*  
\*\*}

\*\*Any ideas how i can get it to have more than one value?
