Invalid indent, expected at least one line in 'if' true block


#1

This is my first game and I’m having trouble with a point allocation system I’m setting up. The points are able to be allocated (after a lot of trial and error) but when it hits 0 the error I get is “levelup line 31: invalid indent, expected at least one line in ‘if’ true block”. I’ve read other posts with the same error (they’ve helped me before) but this one just will not quit.

My code looks like this:

Choose Attributes to Increase:
*label point


Strength - ${strengthpoints}


Agility - ${agilitypoints}


Charisma - ${charismapoints}


Cunning - ${cunningpoints}


Wisdom - ${wisdompoints}


Lore - ${lorepoints}


Points Remaining: ${points}


*choice
	#Give an explanation of attributes
		*goto_scene explanation

	*if points > 0
	#Strength
		*set strength %+20
		*set strengthpoints + 1
		*set points - 1
		*goto point
	*if points > 0
	#Agility
		*set agility %+20
		*set agilitypoints + 1
		*set points - 1
		*goto point
	*if points > 0
	#Charisma
		*set charisma %+20
		*set charismapoints + 1
		*set points - 1
		*goto point
	*if points > 0
	#Cunning
		*set cunning %+20
		*set cunningpoints + 1
		*set points - 1
		*goto point
	*if points > 0
	#Wisdom
		*set wisdom %+20
		*set wisdompoints + 1
		*set points - 1
		*goto point
	*if points > 0
	#Lore
		*set lore %+20
		*set lorepoints + 1
		*set points - 1
		*goto point
	
	*if points = 0
		#Done
		*goto_scene chapterone

#2

I think it might be the indentation; anything a line below an *if statement needs to be indented by one more level. You may also be able to do it by putting the *if statement in line with your #option, in this case.

So this:

*if points > 0
#Strength
	*set strength %+20
	*set strengthpoints + 1
	*set points - 1
	*goto point

Should be this:

*if points > 0
	#Strength
		*set strength %+20
		*set strengthpoints + 1
		*set points - 1
		*goto point

#3

You’re a lifesaver. Thanks. It worked perfectly. I should have realised.