Code: Select all
label start:
label global_label_1:
label .local_1:
"This is label 1-1"
label .local_2:
"This is label 1-2"
label global_label_2:
call .local_2 #Case 1
# call expression "global_label_2.local_2" #Case 2
# call expression ".local_2" #Case 3
label .local_1:
"This is label 2-1"
label .local_2:
"This is label 2-2"
return
It seems that using expressions to provide label names precludes the use of the global/local nesting functionality, since you always need to provide the full label name. Is there a way to make use local labels and expressions together? Am I missing something here?I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 22, in script call
call expression ".local_2" #Case 3
File "game/script.rpy", line 22, in script call
call expression ".local_2" #Case 3
ScriptError: could not find label '.local_2'.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 22, in script call
call expression ".local_2" #Case 3
File "D:\RenPy\renpy-7.3.5-sdk\renpy\ast.py", line 1436, in execute
rv = renpy.game.context().call(label, return_site=self.next.name)
File "game/script.rpy", line 22, in script call
call expression ".local_2" #Case 3
File "D:\RenPy\renpy-7.3.5-sdk\renpy\script.py", line 898, in lookup
raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label '.local_2'.
Windows-8-6.2.9200
Ren'Py 7.3.5.606
locallabeltest 1.0
Sat Apr 10 18:03:32 2021