"Ogre Encampment" LUA error before editing anything

I’m not sure if this is intentional, or if I am doing something wrong as I’m brand new, but I cannot figure out why this error happens before I make any change.

ogre works

I came up with this, but I’m more interested in why “true then”, the default expression, broke the code, while “true do”, didn’t.


I’ve found the same thing on another level “touch of death”

Loops use do, if statements use then.

I didn’t edit the loop in either picture. That’s the default code.