Newbie here, need help making variables and doors

Hi there, I am making my first area and I have most of it complete and just fine tuning the setting. I am trying to have a Tv turn on and off and when it is turned off it displays a message. I created an IF statement for it with the proper variable names but get errored out due to semi colons and colons. the text goes as follows…

Variables
Tvaction is a truth state that varies. Tvaction is false. [Tv dispalying text when turned off]

After turning the Tv off:
if TvAction is true:
display “Have you tried turning it off and on again?”
TvAction is false:
stop the action.

Also I have not learned about how to correctly put a door into a house to have the player enter and exit

Thank you for your help!

(i) Inform is very picky about how text is indented when using colons- you must have the block of phrases after a colon indented by one tab-stop exactly (not spaces) until the phrase introducing the colon no longer applies. This indentation accumulates if one or more phrases ending with a colon are occur with the same block of phrases (i.e. are dependent on the first applying)

(ii) I’m not sure what indentation your story has. When posting here, you must paste copy-and-pasted Inform code between pairs of ‘triple back ticks’ (```) to maintain formatting and indentation.

(iii) I think what you are aiming for here is:

After turning the Tv off:
	if TvAction is true:
		say “Have you tried turning it off and on again?”;
		now TvAction is false.

(iv) to print text in Inform, use ‘say’ not ‘display’- unless you were wanting a boxed quotation, in which case it’s ‘display the boxed quotation’
(v) to allocate a value to a variable in Inform, you must start the phrase with ‘now’
(vi) rules (such as ‘After…’ and some other phrases such as ‘If…’ which may be followed by a block of phrases which are intended only to run if the first applies) end with a colon, but standard phrases end with a semicolon (if part of a block of such phrases) or a full-stop (if free-standing phrases or the last phrase in a block)
(vii) ‘stop the action’ is not generally required in an ‘After…’ rule unless you need to avoid running on into other phrases in the same rule- ‘After’ rules stop the action by default when they complete.

For information on creating Doors, try chapter 3.12 in the Inform documentation

Thank you for the reply, I will test it when I can!