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.
-
Dsiak
- Newbie
- Posts: 14
- Joined: Fri Jul 06, 2018 10:26 pm
- IRC Nick: [Actual Horse]
-
Contact:
#1
Post
by Dsiak » Mon Aug 06, 2018 4:29 pm
I had an unexpected problem during the build where the local labels broke and the code was changed.
This person describes the problem better than I can.
And it gives this error for each line calling a local label:
Code: Select all
File "game/cards.rpy", line 434: expected 'label_name_declare' not found.
call.read from _call_am_card_16.read_1
where am_card_16 is a global label with a local .read inside, like this for example:
Code: Select all
label am_card_2: #1
...
menu:
"1...":
jump .right
"2...":
pass
"3...":
pass
"4...":
pass
...
jump.wrong
label .read:
...
return
label .right:
call .read from _call_am_card_2.read
...
call am_card_3 from _call_am_card_3
jump .end
label .wrong:
call.read from _call_am_card_2.read_1
...
if strike == 3:
jump am_strike
else:
call am_strike from _call_am_strike
label .end:
call am_clear from _call_am_clear
...
jump am_card_4
Does this means Ren'py current version can't handle local variables?
And is there a way to restore the .rpy file to the state it was before trying to compile? Everything is backed up in a .bak file, just paste it / name it back to .rpy.
Last edited by
Dsiak on Wed Aug 08, 2018 4:22 pm, edited 2 times in total.
neigh
-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom » Mon Aug 06, 2018 10:30 pm
What version are you on? This should have been fixed recently.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
Dsiak
- Newbie
- Posts: 14
- Joined: Fri Jul 06, 2018 10:26 pm
- IRC Nick: [Actual Horse]
-
Contact:
#3
Post
by Dsiak » Tue Aug 07, 2018 11:31 am
Hi Sr.Pytom, thanks for answering
I'm on version 7.0.0.196, clicking on update tells me it's up to date. I verified the "download latest" on the webpage and the download is also a .196 version.
neigh
-
rames44
- Veteran
- Posts: 232
- Joined: Sun May 29, 2016 4:38 pm
-
Contact:
#4
Post
by rames44 » Wed Aug 08, 2018 11:21 am
Could it be the fact that you’re missing a space between “call” and “.read”?
-
Dsiak
- Newbie
- Posts: 14
- Joined: Fri Jul 06, 2018 10:26 pm
- IRC Nick: [Actual Horse]
-
Contact:
#5
Post
by Dsiak » Wed Aug 08, 2018 4:05 pm
I didn't noticed the lack of space between the call and the dot, thanks for pointing it out. Some calls were lacking spaces while others were not, but both worked in the preview and both calls got the same error messages.
Just to be sure I corrected all of the lacking spaces and tried to compile again, had the same behavior: all the (local) calls broke and the script had the "from _call_am_card_[number]" in front of every (local) call. Error log on this
pastebin.
Also in case some
pone else is in a similar situation, the original script is saved at the same directory as the .rpy and is named [scriptname].rpy.bak. You can just copy the contents of the .bak into the .rpy and it is back to the way it was before trying to compile.
neigh
-
rames44
- Veteran
- Posts: 232
- Joined: Sun May 29, 2016 4:38 pm
-
Contact:
#6
Post
by rames44 » Thu Aug 09, 2018 12:26 pm
Next question - have you tried “outdenting” the local labels (and their statements) so they’re at the same level as the global label? That’s the structure I use, and they work fine.
-
Dsiak
- Newbie
- Posts: 14
- Joined: Fri Jul 06, 2018 10:26 pm
- IRC Nick: [Actual Horse]
-
Contact:
#7
Post
by Dsiak » Thu Aug 09, 2018 6:20 pm
I experimented compiling with the labels on the back row, they behave the same. Also both indentations work on the preview.
While doing that I realized there is a option called "Add from clauses to calls". I unchecked it and it compiled, I tested the game and the local calls seems to be working. Is there a risk when playing the game like this? It still is very weird.
neigh