Bad Label error


#1

Hi! I’m new to all this and I’m having an issue with the bad label error. I’ve checked a dozen times that the spelling is right, I tried several label names and I even removed the label and goto commands completely and I still got the darn “bad label” error on line 40. the script doesn’t even have 40 lines. please help!


#2

Could you paste your code in here so that we can help?

How to format your code so it can be seen on the forum.

Paste code into window.
Highlight all of the code.
Click the preformatted text button. (It looks like </> and is next to the quote one and on the same bar as the other formatting and smilies choice.)
Click reply.


#3
*label qt
A brighter light suddenly comes on, illuminating a strange console on the far side of the room. With the added light you can 
also see a crude bed and what appears to be a toilet. 

"This is your control console." The voice says. "You see, while the other humans will be the subject experiments on the surface, 
you will be up here controlling them. We implanted them with small subdermal recievers, so you can relay commands. You'll be the voice
in their heads telling them what to do. They will function autonomously, but they are programmed to want to follow your commands. So
do with that what you will...

Anyway, this experiment is designed to observe several thousand generations. So, to be practical, we have encased the planet in
a time dilation field. We can slow down or speed up time as we see fit. So that's good. Oh, and this cnamber is designed to accomodate 
all of your needs, so have no worries there.

If you're ready to begin the experiment, step up to the console."

*Choice
   #"What are you going to do with me after the experiment?"
      "Best not dwell on unimportant details! Now, on to important things!"
      *goto qt

   #"Why am I the one controlling everyone?"
      "Call it random sampling. Ready now?"
      *goto qt

   #"What about food?"
      "Three times per day food will be delivered via one of the delivery consoles in the room. They will    meet all your nutritional
      requirements, but I don't know how it will taste."
      *goto qt

   #Step up to the console
      "Finally! How exciting! I love science."
      *goto scene intro

#4

I know that goto scene at the end is self referential, I’m working on that. thanks btw


#5

First mistake I see is it’d be

*goto_scene intro


#6

I know about that one (didn’t know about the underscore) but I’ve been getting that error with or without that line so it’s not the issue


#7

You haven’t posted the whole code in. You’ve posted a small sample from the looks of it.

As you’ve said though, the code’s incomplete. I don’t think you can adequately test it if it’s unfinished. Of course it’s going to come up with errors.


#8

It’s the whole code in that i’s the entire scene. It’s only the second scene and the first works fine. And as for errors, I guess they will yes but I don’t know where they are or how to fix them


#9

I got you boo. This is what I use and my coding efficiency and neatness has tripled atleast. It should also tell you the proper way to do things so you don’t eff up as hard.

This is an amazing guide. Read through the whole thing. Hope this helps you out, as the finer aspects of coding elude me.

Also, have you saved the file since fixing the label? I know it sounds stupid but I do it sometimes. Try to refresh the page your game is on, also simple but can lead to mistakes.

Ill plug your code into my code real quick and see if I can hash out the problem. Worry not! This day the code shall not win!!


#10

Fixed it. Honestly I’m not sure what the error was, but here is what I did.
I noticed you had 2 too many indentation for my on code (i work on a different set of indentations.) so I reduced those and then lined all the text up. After that i changed *label qt to *label console

Once that was done I plugged it into my code using a goto_scene command and it worked like a charm. Here is the code.

*label console
A brighter light suddenly comes on, illuminating a strange console on the far side of the room. With the added light you can 
also see a crude bed and what appears to be a toilet. 

"This is your control console." The voice says. "You see, while the other humans will be the subject experiments on the surface, 
you will be up here controlling them. We implanted them with small subdermal recievers, so you can relay commands. You'll be the voice
in their heads telling them what to do. They will function autonomously, but they are programmed to want to follow your commands. So
do with that what you will...

Anyway, this experiment is designed to observe several thousand generations. So, to be practical, we have encased the planet in
a time dilation field. We can slow down or speed up time as we see fit. So that's good. Oh, and this chamber is designed to accomidate 
all of your needs, so have no worries there.

If you're ready to begin the experiment, step up to the console."

*Choice
  #"What are you going to do with me after the experiment?"
    "Best not dwell on unimportant details! Now, on to important things!"
    *goto console

  #"Why am I the one controlling everyone?"
    "Call it random sampling. Ready now?"
    *goto console

  #"What about food?"
    "Three times per day food will be delivered via one of the delivery 
    consoles in the room. They will    meet all your nutritional
    requirements, but I don't know how it will taste."
    *goto console

  #Step up to the console
    "Finally! How exciting! I love science."
    *ending


Hopefully that helps in you editing it. STILL USE THE GUIDE <3

#11

Thanks for trying, but I’m still getting the error. Maybe it’s coming from somewhere else. If I add a scene, do I have to modify any other files too? And I save every time I make a change, but I’m working offline so I don’t know about refreshing the page. I’m just doing all this off the my game folder in the choice script download.


#12

How many files do you currently have? It really depends on if there are any other files clashing with that one. Are you doing that in the startup file? you need to start in that one for it to work. I got an error like that before. I’d try to scrap it re download and then put my code into the start up file. Ill try it with a new df launch and see.


#13

I have 2. I used startup and it worked fine. I’m on the second screen now


#14

Ok, update. Instead of creating a new scene, I edited animal to be this script. I didn’t change the name or anything, and now it works. problem is, now how do I add scenes? I don’t want to be confined to using these default ones, or not being able to rename them.


#15

Did you edit the scene list in the startup file?


#16

I did. made sure it was spelled right and everything. No luck


#17

Create a new txt file. Also from this point on I recommend just reading through the guide.


#18

I created a new file and for now everything seems to be working. I have read the guide, and I found it very helpful. Sometimes I just can’t figure out what my mistakes are lol. Thanks for your help everyone!


#19

Great! Glad to hear it!