I am trying to write a function to do time travel. I put the following into
the file script.rpy just before label start:
global hour #4
# Define time travel function
def back_time(): #4
if hour > 7: #8
$ hour -= 1 #12
# Add key to 'back_time', this case is 'h' on keyboard
config.keymap["back_time"] = ["h"] #4
and I get a syntax error. The report puts a red mark between the $ and the hour
Further down the file I find:
$ hour += 1 #4
which is accepted. Please what is wrong? Thank you.
When I preview, the indentation of
the lines has disappeared. So I have added comments: # 8 means indented 8 spaces
(no tabs)
the file script.rpy just before label start:
global hour #4
# Define time travel function
def back_time(): #4
if hour > 7: #8
$ hour -= 1 #12
# Add key to 'back_time', this case is 'h' on keyboard
config.keymap["back_time"] = ["h"] #4
and I get a syntax error. The report puts a red mark between the $ and the hour
Further down the file I find:
$ hour += 1 #4
which is accepted. Please what is wrong? Thank you.
When I preview, the indentation of
the lines has disappeared. So I have added comments: # 8 means indented 8 spaces
(no tabs)