Ultimate Noob Coding

#Only the Saxons
         *if (Saxon >= 40)
         *set Saxon true
         *set Army + 20
         *goto_scene Final
          *else (Saxon < 40)
          *set Saxon false
          *goto_scene Reject
        
   #Only the Tudors
          *if (Tudor >= 40)
          *set Army + 10
          *goto_scene Final
           *elseif (Tudor < 40)
           *goto_scene Reject

Okay, so the problem does seem to be indentation? You need to indent after the *if and *elseif conditionals:

*choice
	#Only the Saxons
		*if (Saxon >= 40)
			*set Saxon true
			*set Army + 20
			*goto_scene Final
		*else (Saxon < 40)
			*set Saxon false
			*goto_scene Reject
	#Only the Tudors
		*if (Tudor >= 40)
			*set Army + 10
			*goto_scene Final
		*elseif (Tudor < 40)
			*goto_scene Reject

You can’t have indentation under *stat_chart, but you can have more than one *stat_chart command.

So you can have:

*stat_chart 
      text Name
      text Title

*if (might = 0)
      *set might_text "You are a weak and fragile person physically"
*stat_chart
      text might_text

But I agree with @TimberWoolf, I believe that string values are better displayed by simply printing it like so:

*if (might = 0)
      *set might_text "You are a weak and fragile person physically"

Might: ${might_text}

The ${} is used to print the value of the variable inside.

1 Like

Thanks for the help. After trying it i made this code in stats, this one is working well with me for the moment but i wanna see your opinions.

[b]Personal Dossier[/b]

[b]Name:[/b]${Name}

[b]Title:[/b]${Title}
*if (might = 0)
    *set might_text "You are a weak and fragile person physically"

[b]Might:[/b] ${might_text}
     
1 Like

Thank you! I will keep testing aggressively as I write so I don’t end up having too much to clean. It could have been a network issue who knows lol. thanks

After a bit of editing due to other errors, it worked.

Thank you :slight_smile:

1 Like

That’s a good way of doing it.

1 Like

Okay I am really get angry at this illegal mixing spaces and tabs thing, every time I try and correct it I get a different error, expected one body choice.

Now for your allies, will you ask for them to help you? (This excludes the Sidhe)

*choice

 

#Only the Saxons 
*if (Saxon >= 40)
			*set Saxon true
			*set Army + 20
			*goto_scene Final
		*else 
			*set Saxon false
			*goto_scene Reject
	#Only the Tudors
		*if (Tudor >= 40)
			*set Army + 10
			*goto_scene Final
		*else
			*set Tudor false
			*goto_scene Rejection

	#Only the Witch Queen
		*if (Dar = True)
			*set Army + 30
			*goto_scene Final
		*else 
			*set Dar false
			*goto_scene Dare

 *selectable_if (Army >= 30) #Lift some weights.
1 Like

Then don’t mix them. :man_shrugging:

Personally I prefer tabs.

Btw, I fixed your whitespace using tabs:

*choice
	#Only the Saxons 
		*if (Saxon >= 40)
			*set Saxon true
			*set Army + 20
			*goto_scene Final
		*else 
			*set Saxon false
			*goto_scene Reject
	#Only the Tudors
		*if (Tudor >= 40)
			*set Army + 10
			*goto_scene Final
		*else
			*set Tudor false
			*goto_scene Rejection
	#Only the Witch Queen
		*if (Dar = True)
			*set Army + 30
			*goto_scene Final
		*else 
			*set Dar false
			*goto_scene Dare
	*selectable_if (Army >= 30) #Lift some weights.

#Options are the “child” element of the command *choice. Nest them right beneath the command.

*choice
	#Option1
		Text of option1
	#Option2
		Text of

Just pick either spaces or tabs, don’t use both. It screws up everything, at least for me.

2 Likes

So, i’m making 2 different childhood scenes depending in the characters but when i tried to go to them this issue appears.

*if plebeian true
    *goto_scene plebeianchildhood
*if noble true
    *goto_scene noblechildhood
    

this is the issue that happens

line 120 of prologue: invalid expression at char 13, expected OPERATOR, was: VAR [true]  

the variables that i use to determine the MC’s background are true and false. Can i use numbers for them or that may arise future problems?

I can’t be too certain at the moment, but I suspect it might want you to say *if noble = true.

With booleans, though, you don’t need to specify whether the condition should be true, because they always check for true-ness.

That means you can say *if noble and it’ll assume that you’re checking if noble is set to true.

3 Likes

I agree with @TimberWoolf, so you said that you did set the variable true, so try the

*if (plebeian=true)
  *goto_scene plebeianchildhood

and see how that goes

2 Likes

thanks, it worked both ways

2 Likes