Must end in goto or finish...but it does

So here’s the exact code I’m having problems with. Please ignore the *if (coatpat = “1”), I am very tired of people telling me to take out the “”, as I have no issues with that anywhere in my game. So far, doberman is the only choice having this issue.

#Doberman
           A working class breed, the Doberman is iconic as an attack dog. They generally stand at 2'2" to 2'4", weighing 60-80 lbs, and living around 10-13 years.
           *line_break
           A newer breed, appearing around the end of the 19th century, Dobie's are elegant and have an athletic build. Intelligent, loyal, and alert, they are not only courageous guard dogs but make excellent family companions. Dobie's are not aggressive like many people believe; they are peaceful dogs and are gentle, however they do get protective of their families.
           *line_break
           Dobie's, contrary to some beliefs, DO NOT have upright or "cropped" ears and docked tails. Their ears are actually more long and floppy, while the tail is long and thin. They are often cropped and docked as puppies, which is illegal in some countries and becoming illegal in America as well.
           *set eyes "Brown"
           *line_break
           *line_break
           Doberman's have nine different coat patterns. White, fawn & rust, black & rust, black, tan, red & rust, fawn, blue, and blue & rust.
           *set subbreed "Working"
           *set size "Large"
           *set breed "Doberman"
           *set coat "Short"
           *set texture "Smooth"
           *set muzzle "Long Narrow"
           *set legs "Long Thin"
           *set tail "Long Thin"
           *set str +2
           *set int +3
           *set guard +1
           *set listen %+5
           *set rank %+5
           *set moral %+5
           *rand coat 1 9
           *if (coatpat = "1")
             *set pelt "Fawn"
             *goto_scene puremom
           *if (coatpat = "2")
             *set pelt "White"
             *goto_scene puremom
           *if (coatpat = "3")
             *set pelt "Black"
             *goto_scene puremom
           *if (coatpat = "4")
             *set pelt "Tan"
             *goto_scene puremom
           *if (coatpat = "5")
             *set pelt "Black & Rust"
             *goto_scene puremom
           *if (coatpat = "6")
             *set pelt "Fawn & Rust"
             *goto_scene puremom
           *if (coatpat = "7")
             *set pelt "Red & Rust"
             *goto_scene puremom
           *if (coatpat = "8")
             *set pelt "Blue"
             *goto_scene puremom
           *if (coatpat = "9")
             *set pelt "Blue & Rust"
             *goto_scene puremom
1 Like

I think when you work with a goto it should look like this

*if (coatpat =1)
   *set etc
   *goto x
*elseif (coatpat =2)
   *set etc
   *goto x
*elseif etc up to 8 and the
*else
   *set etc
   *goto x

other possibility might be an indentation error. can you see your indent count on what you’re writing with?

1 Like

But every other dog breed has the same exact code (ok, well a few just have your pelt set to a color but the rest have the same *if (coatpat = #) and having no issues with any of the ones I’ve been testing since I posted them.

I checked the indent, it’s fine. No issue with it.

1 Like

literally just found the problem & now i feel stupid. i had *rand coat instead of *rand coatpat

1 Like

I think the issue here is that all the gotos are nested inside ifs. If this error comes from quicktest then it probably thinks that there should be an option of goto or finish that is not inside the conditions. Such as in the end right after the *if (coatpat = “9”)

And also looking at the code there is no need to place a *goto_scene after every they all go to the same one. Just place it after the conditions.

.
.
.
           *set moral %+5
           *rand coat 1 9
           *if (coatpat = "1")
             *set pelt "Fawn"
           *if (coatpat = "2")
             *set pelt "White"
           *if (coatpat = "3")
             *set pelt "Black"
           *if (coatpat = "4")
             *set pelt "Tan"
           *if (coatpat = "5")
             *set pelt "Black & Rust"
           *if (coatpat = "6")
             *set pelt "Fawn & Rust"
           *if (coatpat = "7")
             *set pelt "Red & Rust"
           *if (coatpat = "8")
             *set pelt "Blue"
           *if (coatpat = "9")
             *set pelt "Blue & Rust"
           *goto_scene puremom

Try leaving the *goto_scene after the *if block.

EDIT: Ah yeah, so it kinda was related. It gave an error because none of the conditions were met.

1 Like

wait. *goto_scene <scene_name_here> works without a <label_name> after the scene name?

Edit: good to know. Thanks pals.

1 Like

yes

2 Likes

Yes.

It moves the story to the scene file, instead of a label within said scene file

2 Likes