*if (variable = variable) *goto

I’m actually not getting a yellow bug on mine… that I notice. How are you testing it?


you just made me use booleans for the first time!

Give ma a few more minutes as I think I, crossing my fingers, have it worked out :wink:

Never mind that kind defeat the propose in the first place going to have to think on this a bit more.

I found the bug test some more to make sure this time lol.

Alright the only way I could stop the long loop it break it up into groups of four.
So you have randomization within each block but only by threes. I may come up with a better way later on but sleep is calling to me here soon. I’ll pm you later if I come up with something better or one of the Guru’s of CS give you better code. Here is what I have that test consistently.

Bad code removed

Sorry I could not come up with something better tonight.

1 Like

I think you’re doing awesomely. Thanks!

1 Like

Thanks, but not a great programer but do not like to give up on something hehe.

Alright lol this looks like the answer, WHY it stops the long loop problem not sure, added two fake lines to the code on a hunch and results are great. they are no longer broken up into sections. Testing does not freeze up. Not seeing a repeat of the color anywhere. This code looks good.

startup

*title gosub rand
*author Lordirish
*comment your code here


*create pink false
*create yellow false
*create orange false
*create red false
*create brown false
*create purple false
*create grey false
*create green false
*create blue false
*create black false
*create white false
*create first_colour_adjective ""
*create two_colour_adjective ""
*create three_colour_adjective ""
*create four_colour_adjective ""
*create five_colour_adjective ""
*create six_colour_adjective ""
*create seven_colour_adjective ""
*create eight_colour_adjective ""
*create nine_colour_adjective ""
*create ten_colour_adjective ""
*create eleven_colour_adjective ""
*create var 0
*create na false
*create an false
*goto_scene color

Color

*choice
  #Lets start
    *goto reset

*comment any time you need to use the code always start with reset
*label reset
*set pink true
*set yellow true
*set orange true
*set red true
*set brown true
*set purple true
*set grey true
*set green true
*set blue true
*set black true
*set white true
*set na true
*set an false

*label double_colour_adjective
*temp hold ""
*rand var 1 11

*gosub fill
*set first_colour_adjective hold
*gosub fill
*set two_colour_adjective hold
*gosub fill
*set three_colour_adjective hold
*gosub fill
*set four_colour_adjective hold
*gosub fill
*set five_colour_adjective hold
*gosub fill
*set six_colour_adjective hold
*gosub fill
*set seven_colour_adjective hold
*gosub fill
*set eight_colour_adjective hold
*gosub fill
*set nine_colour_adjective hold
*gosub fill
*set ten_colour_adjective hold
*gosub fill
*set eleven_colour_adjective hold
*gosub fill4
*goto some_place

*label fill
*rand var 3 13
*if ((var=13) and (blue))
  *set hold "blue "
  *set blue false
  *return 
*if ((var=12) and (black))
  *set hold "black "
  *set black false
  *return 
*if ((var=11) and (pink))
  *set hold "pink"
  *set pink false
  *return
*if ((var=10) and (yellow))
  *set hold "yellow"
  *set yellow false
  *return 
*if ((var=9)and (orange))
  *set hold "orange"
  *set orange false
  *return 
*if ((var=8) and (red))
  *set hold "red"
  *set red false
  *return 
*if ((var=7) and (brown))
  *set hold "brown"
  *set brown false
  *return 
*if ((var=6) and (purple))
  *set hold "purple"
  *set purple false
  *return 
*if ((var=5) and (grey))
  *set hold "grey "
  *set grey false
  *return 
*if ((var=4) and (green))
  *set hold "green "
  *set green false
  *return 
*if ((var=3) and (white))
  *set hold "white "
  *set white false
  *return 
*else
  *gosub fill
  *return
  
*label fill4
*rand var 1 2
*if ((var=2) and (blue))
  *set hold "blue "
  *set blue false
  *return 
*if ((var=1) and (black))
  *set hold "black "
  *set black false
  *return 
*else
  *if (na)
    *set na false
    *return
  *if (an)
    *set an false
    *return
    
*label some_place
${first_colour_adjective}
*line_break
${two_colour_adjective}
*line_break
${three_colour_adjective}
*line_break
${four_colour_adjective}
*line_break
${five_colour_adjective}
*line_break
${six_colour_adjective}
*line_break
${seven_colour_adjective}
*line_break
${eight_colour_adjective}
*line_break
${nine_colour_adjective}
*line_break
${ten_colour_adjective}
*line_break
${eleven_colour_adjective}
*page_break Restart
*goto reset

Hope this helps any other bugs you may find let me know and I will tackle this again. But from what I am seeing works spot on for a change :grin:

3 Likes

:balloon::dizzy::sparkles::tada: well done! Very impressive

2 Likes

Well I am sure it will make those that are coders cringe but for whatever reason it works hehe. And thanks it was a fun challenge to tackle.

2 Likes