Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
I was going to place this in the bug replication section, but first I wanted to make sure this wasn't a feature instead. Let's look at an example code:
label example:
call pick("paper") #works flawlessly
jump pick("paper") #causes an exception
return
label pick(object="stone"):
"I picked up the [object]"
return
In the above code, what I'd expect is to pick a paper, then pick another paper, then go back to the main menu. However, the jump statement says that it expected a newline right over the opening parentheses. If that line is commented, the code runs smoothly. Does anyone have any idea why is that, and any tips or alternatives to solve it? I'm using ren'py 6.99.7.858, if that helps about something. Thanks in advance!
Did you put return at the end of paper as you did with "stone"?
All I can think of here, is you're jumping to the label "example", and then instantly jumping to another label.
You should change that so there's some kind of user-interaction between the jumps.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Looking at the documentation, it doesn't seem like jumping with parameters is intended. (Call explicitly mentions parameters, jump does not.) Not sure why though. Might be worth raising with PyTom if you'd like. https://www.renpy.org/doc/html/label.ht ... -statement
If you go to (jump to) another line of the code, you can't tell its scope is local or global. It'll share the same global scope, so arguments become meaningless. In that's case, the following would do the same thing.