String variable creation help

I’m having trouble with names. When I want to add names to choose from there’s an error when I try to test my game and I don’t know what to do. The error always says that line… Create. name was previously created in line… And if I try to do anything about it it doesn’t work and it says the same thing.
I’m reading guides and I’m doing it like they’re saying and it still doesn’t work.
So if anyone knows what to do and replies thank you for helping.

It seems your problem is on the file “startup.txt” check all the *create commands you have there and make sure there’s no duplicates.

Otherwise you could post the code here for us to see and check the problem, it is easier to spot bugs on the code when you actually see the code.

pd. Welcome to the forum, I’m no expert by any means so take that into consideration.

Oh, I realize that you maybe want to create several names. to do that you should name every one of them differently ex:
*create name1
*create name2
*create name3
etc…
you can’t have anything named the same way twice.

Ok, so! It does depend a lot on what you’re trying to do, like Loudbeat said. I’d also recommend you check the startup file (it’s usually where all coding problems are :grin: )

If I understood correctly, you’re trying to add the options of names for the MC, right? But trying to create a variable for each name option would probably be tiring, and if you’re getting an error about “(variable) was previously created in”, that probably means you’re trying to use the same name for each variable. (As in creating a double “name” or “surname” or etc, I’m not entirely sure)

So, let’s say you’re setting up everything in the startup file, right at the start. It should probably look something like this:

image
This would be the setup for the name choosing, see? A single variable (name) which can change depending on what the player chooses. Trying to play that would result in this screen

image
So let’s say you choose “Sam”, clicking the “Next” will take you to
image

It’s mostly the same for any written variable you’d want to add like that (surnames, some customizations, etc, etc), though you can add and/or expand however you like as you get the hang of it.

Hope this helped! I wish you luck on your project :smiley:

1 Like

Thank you it really helped!! :grin:

Hey there! If someone’s post was able to resolve your problem, please mark it as the solution so that others with the same problem can find it easier! You can find the solution button by clicking/tapping on the ellipsis on the post and selecting the check mark button. :slight_smile:

1 Like

Question resolved!