Not sure what is wrong, but it must be whole thing due to the fact that i deleted one and the next in line failed. I uploaded the whole thing sorry its so long!
*label chart
*line_break
*stat_chart
text shooting_text Shooting Level
text threes_text Threes Level
text dunks_text Dunks Level
text dribbling_text Dribbling Level
text passing_text Passing Level
text offense_text Offense Level
text rebounding_text Rebounding Level
text defense_text Defense Level
text blocks_text Blocks Level
text steals_text Steals Level
text speed_text Speed Level
text strength_text Strength Level
text stamina_text Stamina Level
text academics_text Academics Level
text social_text Social Level
text fame_text Fame Level
*line_break
I think you have to be more specific, which variable did the error say was non-existent?
also, try using this
when showing code in the forum, helps people identify indentation and such
like this
Line one
indented text
Cheers!
EDIT: I could very well be wrong, but… you might want to delete all those goto lines. Since with them, you skip all the other temp variables and head straight to the chart. And since your chart uses those very same temp variables you skipped… might cause problems.
I think that might be the problem, actually. Since you skipped over creating and setting those temps, they never existed in the first place.
All of them have to go.
The gotos actually are not required here, since the ifs and elses do their job of blocking lines that don’t match the stats.
Mhmmm, just as I thought. Since Shooting was completed with no problems, but the code jumped to the chart right after, it didn’t have a chance to create the other temps, and since Threes is the one that comes right after Shooting, it gets the error first.
No, no, just leave them as-is.
The finish command ends the scene, you don’t want that! XD
Basically, without goto, the programs reads the next line, and so on.
And you won’t have to worry about it reading the other parts of the same if block you don’t want it to, since if blocks are special cases, where only one outcome is read.
Correct me if I’m wrong, but don’t you have to enable implicit flow control to prevent that from throwing error messages? Or is it enabled by default now?
so once i deleted the goto it is now saying it is illegal to fall out of a else statement without a finish or goto before the end of the indented block.
Depending on when you downloaded your ChoiceScript installation, the fastest thing to fix that is probably going back to your startup.txt and adding the following line in among the rest of your *create commands:
*create implicit_flow_control true
Assuming your CS installation is new enough, that will remove the error immediately. There ARE alternatives if that doesn’t work, however. Give it a try and report back to us, okay?
You could leave the *goto commands in place, but add extra *label statements between each block of *set commands, so that one block can jump to the next instead of jumping to the chart.
You could replace the *else and *elseif statements with carefully constructed *if statements.
@UmbraLamia just gave an excellent example of the first alternative.
The second alternative might look something like this:
I don’t recommend this last method for most situations, as you’ll need to be very careful you haven’t left any “gaps” a player could accidentally slip through. For example, if one *if statement had read (shooting < 3) and the next had read (shooting > 3), ChoiceScript would have had no instructions on what to do when shooting was exactly 3. Bigger or smaller than 3, it could handle, but exactly 3? Error!
Still, if you’re careful, the option’s available. And who knows, maybe you’ll find a situation where you need a way for some players to slip through the gaps on purpose.
I had to gave it a rest last night due to going to work. When I get home ill use everyones suggestions and find the best way from above examples! Thanks again ill be sure to update.