Rather long code but, I have the log that displays the code in the section I am running so I can check changes quickly. I have three *if tables that are chosen from a rand roll.The problem seems a var is not being changed in the second and third table. I have change the order around on which table is called first. Whichever table is first works without a hitch, second and third table will not change the var if the random roll is 8 or below. I have run this at least 50 times tracking the var and results in a notebook to see if it was something I was missing.The code below is what I started with. I even broke the code up over three pages along with a few other variations of the code still same results. Any Ideas what I am doing wrong or is this a CS bug? Thanks.
*comment set locations for Torif *rand r_roll_2 1 20 *set r_roll r_roll_2 *gosub clothing_riverfront *rand r_roll_3 1 20 *set r_roll r_roll_3 *gosub clothing_eastend *rand r_roll_1 1 20 *set r_roll r_roll_1 *gosub clothing_downtown *return *label clothing_eastend *if (r_roll=20) *set clothing_eastend "Belle's Clothing" *return *if (r_roll=19) *set clothing_eastend "Juliane's Styles" *return *if (r_roll=18) *set clothing_eastend "Rohie's Designs" *return *if (r_roll=17) *set clothing_eastend "Rosewood's Boutique" *return *if (r_roll=16) *set clothing_eastend "Sashira's Trendy Clothing" *return *if (r_roll=15) *set clothing_eastend "Wraith's Fashions" *return *if (r_roll=14) *set clothing_eastend "Leigh's Apparel" *return *if (r_roll=13) *set clothing_eastend "Camille's Outfitters" *return *if (r_roll=12) *set clothing_eastend "Bellamy b Fashions" *return *if (r_roll=11) *set clothing_eastend "Tori's Clothing" *return *if (r_roll=10) *set clothing_eastend "Adrao's Styles" *return *if (r_roll=9) *set clothing_eastend "Arcania Designs" *return *if (r_roll=8) *set clothing_downtown "Hannah's Boutique" *return *if (r_roll=7) *set clothing_downtown "Alex's Trendy Clothing" *return *if (r_roll=6) *set clothing_downtown "Port3r's Designs" *return *if (r_roll=5) *set clothing_downtown "Aera's Outfitters" *return *if (r_roll=4) *set clothing_downtown "Weiss's Fashions" *return *if (r_roll=3) *set clothing_downtown "Kira's Styles" *return *if (r_roll=2) *set clothing_downtown "Braelyn's Boutique" *return *if (r_roll=1) *set clothing_downtown "Misti's Apparel" *return *label clothing_riverfront *if (r_roll=20) *set clothing_riverfront "Belle's Clothing" *return *if (r_roll=19) *set clothing_riverfront "Juliane's Styles" *return *if (r_roll=18) *set clothing_riverfront "Rohie's Designs" *return *if (r_roll=17) *set clothing_riverfront "Rosewood's Boutique" *return *if (r_roll=16) *set clothing_riverfront "Sashira's Trendy Clothing" *return *if (r_roll=15) *set clothing_riverfront "Wraith's Fashions" *return *if (r_roll=14) *set clothing_riverfront "Leigh's Apparel" *return *if (r_roll=13) *set clothing_riverfront "Camille's Outfitters" *return *if (r_roll=12) *set clothing_riverfront "Bellamy b Fashions" *return *if (r_roll=11) *set clothing_riverfront "Tori's Clothing" *return *if (r_roll=10) *set clothing_riverfront "Adrao's Styles" *return *if (r_roll=9) *set clothing_riverfront "Arcania Designs" *return *if (r_roll=8) *set clothing_downtown "Hannah's Boutique" *return *if (r_roll=7) *set clothing_downtown "Alex's Trendy Clothing" *return *if (r_roll=6) *set clothing_downtown "Port3r's Designs" *return *if (r_roll=5) *set clothing_downtown "Aera's Outfitters" *return *if (r_roll=4) *set clothing_downtown "Weiss's Fashions" *return *if (r_roll=3) *set clothing_downtown "Kira's Styles" *return *if (r_roll=2) *set clothing_downtown "Braelyn's Boutique" *return *if (r_roll=1) *set clothing_downtown "Misti's Apparel" *return *label clothing_downtown *if (r_roll=20) *set clothing_downtown "Belle's Clothing" *return *if (r_roll=19) *set clothing_downtown "Juliane's Styles" *return *if (r_roll=18) *set clothing_downtown "Rohie's Designs" *return *if (r_roll=17) *set clothing_downtown "Rosewood's Boutique" *return *if (r_roll=16) *set clothing_downtown "Sashira's Trendy Clothing" *return *if (r_roll=15) *set clothing_downtown "Wraith's Fashions" *return *if (r_roll=14) *set clothing_downtown "Leigh's Apparel" *return *if (r_roll=13) *set clothing_downtown "Camille's Outfitters" *return *if (r_roll=12) *set clothing_downtown "Bellamy b Fashions" *return *if (r_roll=11) *set clothing_downtown "Tori's Clothing" *return *if (r_roll=10) *set clothing_downtown "Adrao's Styles" *return *if (r_roll=9) *set clothing_downtown "Arcania Designs" *return *if (r_roll=8) *set clothing_downtown "Hannah's Boutique" *return *if (r_roll=7) *set clothing_downtown "Alex's Trendy Clothing" *return *if (r_roll=6) *set clothing_downtown "Port3r's Designs" *return *if (r_roll=5) *set clothing_downtown "Aera's Outfitters" *return *if (r_roll=4) *set clothing_downtown "Weiss's Fashions" *return *if (r_roll=3) *set clothing_downtown "Kira's Styles" *return *if (r_roll=2) *set clothing_downtown "Braelyn's Boutique" *return *if (r_roll=1) *set clothing_downtown "Misti's Apparel" *return