More weird bugs: stat screen formatting


#1

In my second game, I have two problems with choicescript_stats that should not exist.

  1. I have a blank line between each section. This displays as two blank lines between my title and first stat, and the rest all run together. I’ve tried replacing the space with two *line_break commands, but that creates a bigger space than I want (it appears as two blank lines.)

  2. I want a way to show/hide additional stats. Because I only need one command, I tried doing this as a page_break to switch from one to the other. This didn’t work, so I replaced it with a fake_choice to take you to the additional stats, and another to take you back. The code kept giving me bugs about “must start with text, input or opposed_pair” - one line it named was the stat_chart command, then a line that did start with *text. I assume it’s throwing up an error from the line before that, which is the screen-switching code.

I have no idea why my code is doing this. Please help. Actual code follows. Note - the part following “You are” is supposed to display as a single line, which it’s doing. Stat4 currently does not display as descriptive text.

*label main_stats
[b]Game Title[/b]

[b]Stat1:[/b]
*line_break
*if (stat1>80)
   Text description goes here
*if ((stat1>60) and (stat1<=80))
   Text description goes here
*if ((stat1>40) and (stat1<=60))
   Text description goes here
*if ((stat1>20) and (stat1<=40))
   Text description goes here
*if (stat1<=20)
   Text description goes here

[b]Stat2:[/b]
*line_break
*if (stat2>80)
   Text description goes here
*if ((stat2<=80) and (stat2>60))
   Text description goes here
*if ((stat2<=60) and (stat2>40))
   Text description goes here
*if ((stat2<=40) and (stat2>20))
   Text description goes here
*if (stat2<=20)
   Text description goes here

You are 
*if (type="unknown")
   Text description goes here 
*if (type="type1")
   Text description goes here 
*if (type="type2")
   Text description goes here 
*if (type="type2")
   Text description goes here
*if ((stat3<=5) and (type!="unknown"))
   Text description goes here
*if ((stat3>5) and (stat3<=10))
   Text description goes here
*if ((stat3>10) and (stat3<20))
   Text description goes here
*if (stat3>=20)
   Text description goes here
*if (stat3<=5)
   Text description goes here
*if ((stat3>5) and (stat3<=10))
   Text description goes here
*if ((stat3>10) and (stat3<=20))
   Text description goes here
*if (stat3>20)
   Text description goes here
*fake_choice
   #Display stats as numbers
      *goto numeric_stats
*label numeric_stats
*stat_chart
   *text stat1
   *text stat2
   *text stat3
   *text stat4
*fake_choice
   #Return to descriptive stats
      *goto main_stats

#2

Get rid of those asterisks next to ‘text’ in the stat chart. They shouldn’t be there.


#3
  1. Have you recently updated your version of ChoiceScript? Dan altered the way ChoiceScript spaces things during *ifs. Have you tried a single line_break where you’ve doubled returned?

  2. As @OdicHastings hasting said it should start with text not *text


#4

Yes, a single line break works as it should, adding a carriage return but no line space. Combining the two brings it back to a double space. I’ll check out the latest CS changes; this could also possibly explain why my quicktest hasn’t been working for the new game.

Thanks to both of you, I think this should fix it!