# Consolidate code help

**URL:** <https://forum.kirupa.com/t/consolidate-code-help/172902>\
**Category:** Uncategorized\
**Created:** [December 19, 2005, 3:34pm UTC](https://forum.kirupa.com/t/consolidate-code-help/172902 "2005-12-19T15:34:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flash\_noob1](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@flash\_noob1](https://forum.kirupa.com/u/flash_noob1)\
**Post date:** [December 19, 2005, 3:34pm UTC](https://forum.kirupa.com/t/consolidate-code-help/172902/1 "2005-12-19T15:34:21Z")

</div>

I want to consolidate some code…

Im trying to import varibles, and I dont want to have it written out 28 times. I figured this task could be done using an array or function with parmaters. I dunno about this stuff. I need some help writing it:

\_root[“practiceQuestion”+practiceQuestionNumber+“Quiz”+quizNumber+“Status”] = \_root.myLocal\_so.data[“SO\_practiceQuestion”+practiceQuestionNumber+“Quiz”+quizNumber+“Status”];

practiceQuestionNumber = I have 6 practice questions  
quizNumber = Each of the 6 practice questions has this many quizes (In order) 5,6,4,4,5,4 (For example practice question 1 has 5 quizes, practice question 2 has 6 quizes and so on.)

So I have a total of 28 questions…

If you have any questions let me know.

-T
