11-16-2008 12:34 PM
Solved! Go to Solution.
11-16-2008 12:39 PM
11-16-2008 01:14 PM
11-16-2008 01:22 PM
11-16-2008 01:31 PM
We definitely need more detail. What if none of the entries is 8? What if more than one number is 8? What are the villains?
If the user need to enter numbers 1-8 in the 8 controls (no duplicates), you probably should use integer controls. Make an array of all controls using built array and search for "8" using "search array". Use the resulting index to get the villain from an array of villain strings.
11-16-2008 01:56 PM
the villians are:
Captain Hook[1] (Peter Pan)
Fear of Water: 7
Fear of Fire: 3
Fear of Evil: 4
Fear of Fate: 8
Fear of Magic: 1
Fear of Change: 6
Fear of Wildlife: 2
Fear of The Dark: 5
Chernabog[1] (Fantasia)
Fear of Water: 2
Fear of Fire: 6
Fear of Evil: 7
Fear of Fate: 1
Fear of Magic: 3
Fear of Change: 4
Fear of Wildlife: 5
Fear of The Dark: 8
Hades[1] (Hercules)
Fear of Water: 1
Fear of Fire: 8
Fear of Evil: 2
Fear of Fate: 3
Fear of Magic: 7
Fear of Change: 5
Fear of Wildlife: 4
Fear of The Dark: 6
Jafar[1] (Aladdin)
Fear of Water: 3
Fear of Fire: 7
Fear of Evil: 5
Fear of Fate: 4
Fear of Magic: 8
Fear of Change: 2
Fear of Wildlife: 6
Fear of The Dark: 1
Maleficent[1] (Sleeping Beauty)
Fear of Water: 6
Fear of Fire: 5
Fear of Evil: 8
Fear of Fate: 2
Fear of Magic: 4
Fear of Change: 7
Fear of Wildlife: 1
Fear of The Dark: 3
Queen[1] (Snow White)
Fear of Water: 5
Fear of Fire: 4
Fear of Evil: 1
Fear of Fate: 7
Fear of Magic: 6
Fear of Change: 8
Fear of Wildlife: 3
Fear of The Dark: 2
Scar[1] (The Lion King)
Fear of Water: 4
Fear of Fire: 2
Fear of Evil: 3
Fear of Fate: 6
Fear of Magic: 5
Fear of Change: 1
Fear of Wildlife: 8
Fear of The Dark: 7
Ursula[1] (The Little Mermaid)
Fear of Water: 8
Fear of Fire: 1
Fear of Evil: 6
Fear of Fate: 5
Fear of Magic: 2
Fear of Change: 3
Fear of Wildlife: 7
Fear of The Dark: 4
the only one that matters is the 8 in the selection if there is mor than one 8 than it will prompt the user to not put more than one 8
11-16-2008 02:20 PM
OK, it seems you should be able to do this very easily as described:
"Make an array of all controls using built array and search for "8" using "search array". Use the resulting index to get the villain from an array of villain strings."
Have you tried? Where did you get stuck?
11-16-2008 04:15 PM
ok i have the first part where i put my controls through a build array here it is what about my villians though how will the program know if i put 8 on the "fear of wildlife" that the string Scar sould appear in the string indecator box
here is what i have:
11-16-2008 04:35 PM - edited 11-16-2008 04:37 PM
Well, as I said, just use search array, search for the first occurence of the number 8, and index into an array of villains.
It would be much easier to use an array of controls instead of 8 individual controls, but here's an image of a quick draft. You really should change your inputs to integer (blue) representation. (If you want to keep individual controls, just wire the array you built into the same code, the rest remains identical.)
11-16-2008 05:47 PM
here is the code i am using and for some reason it does not work
here is the code: