Code: Select all
init python:
def appendParse(lexer):
textToAppend = lexer.string();
return textToAppend
def appendExecute(textToAppend):
narrator(textToAppend)
ReadLastEntry()
renpy.register_statement("append", parse = appendParse, execute = appendExecute)
Code: Select all
label start:
append "I am appending this text."
Code: Select all
[code]
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/main.rpy", line 2, in script
append "I am appending this text."
Exception: Sayer 'append' is not defined.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/main.rpy", line 2, in script
append "I am appending this text."
File "C:\Users\My Name\Desktop\Ren'py\renpy\ast.py", line 593, in execute
who = eval_who(self.who, self.who_fast)
File "C:\Users\My Name\Desktop\Ren'py\renpy\ast.py", line 509, in eval_who
raise Exception("Sayer '%s' is not defined." % who.encode("utf-8"))
Exception: Sayer 'append' is not defined.
Windows-7-6.1.7601-SP1
Ren'Py 6.99.12.4.2187
HB 1.0
Code: Select all
label start:
"hello"
append "there"
The error becomes:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/main.rpy", line 2, in script
"hello"
File "renpy/common/00nvl_mode.rpy", line 293, in do_display
page = self.clear or nvl_clear_next()
File "renpy/common/00nvl_mode.rpy", line 252, in nvl_clear_next
scry = scry.next()
AttributeError: 'StoreModule' object has no attribute 'append'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/main.rpy", line 2, in script
"hello"
File "C:\Users\My Name\Desktop\Ren'py\renpy\ast.py", line 613, in execute
renpy.exports.say(who, what, interact=self.interact)
File "C:\Users\My Name\Desktop\Ren'py\renpy\exports.py", line 1147, in say
who(what, interact=interact)
File "C:\Users\My Name\Desktop\Ren'py\renpy\character.py", line 877, in __call__
self.do_display(who, what, cb_args=self.cb_args, **display_args)
File "renpy/common/00nvl_mode.rpy", line 293, in do_display
page = self.clear or nvl_clear_next()
File "renpy/common/00nvl_mode.rpy", line 252, in nvl_clear_next
scry = scry.next()
File "C:\Users\My Name\Desktop\Ren'py\renpy\ast.py", line 305, in next
return self._next.scry()
File "C:\Users\My Name\Desktop\Ren'py\renpy\ast.py", line 649, in scry
who = getattr(renpy.store, self.who)
AttributeError: 'StoreModule' object has no attribute 'append'
Windows-7-6.1.7601-SP1
Ren'Py 6.99.12.4.2187
HB 1.0