if statements with multiple cases

I have a “switch case” as it is called in some languages. I have tried every little thing to get it to work, but at first, it seemed that repeat blocks are not allowed in the cases (I tried assigned 6 sling bullets to the Scout.) Then I tried a single bullet, and I got the same error.

Here is the code and the error statement.

	if class of player is:
		-- "Fighter":
			say "...Equipping Fighter gear...";
			let myLA be a random leather armor in GenerationSpace;
			now player is wearing myLA;
			let mySS be a random short sword in GenerationSpace;
			now player is wearing mySS;	
		-- "Scout":		
			say "...Equipping Scout gear...";
			let myLA be a random leather armor in GenerationSpace;
			now player is wearing myLA;
			let myDg be a random dagger in GenerationSpace;
			now player is carrying myDg;
			let mySling be a random sling in GenerationSpace;
			now player is carrying mySling;
			repeat with counter running from 1 to 6:
				let myB be a random sling bullet in GenerationSpace;
				now player is carrying myB;
		-- "Cleric":
			say "...Equipping Cleric gear...";
			let myLA be a random leather armor in GenerationSpace;
			now player is wearing myLA;
			let myQS be a random quarterstaff in GenerationSpace;
			now player is carrying myQS;
		-- "Magician":
			say "...Equipping Magician gear...";
			let myPR be a random padded robe in GenerationSpace;
			now player is wearing myPR;
			let myDg be a random dagger in GenerationSpace;
			now player is carrying myDg;
			repeat with counter running from 1 to 8:
				let myDart be a random dart in GenerationSpace;
				now player is carrying myDart;
		-- otherwise:
			say "Not ready for that class yet.";	

ERROR: You wrote '“Cleric”'but this seems to be misplaced since it is not a case within an ‘if X is…’, as it must be. Each case must be placed one tab stop in from the ‘if X is…’ to which it belongs, and the instructions for what to do in that case should be one tab stop further in still.
See the manual: 11.8 > 11.8. Otherwise

I have carefully checked all tabs and spaces, moved cases around, and even created a new rule I call from with the switch case. Nothing. Same error. What’s up?

EDIT: I replaced (retyped) a few lines and somehow that removed the error. There must have been some invisible characters mucking up the works.
The code above (edited) now works. Notive that the Magician is assigned 8 darts and the Scout is assigned 6 sling bullets.