Invalid syntax

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.
Post Reply
Message
Author
SteelRazer
Newbie
Posts: 10
Joined: Thu Dec 06, 2018 12:25 pm
Contact:

Invalid syntax

#1 Post by SteelRazer » Fri Dec 07, 2018 5:12 pm

I tried to declare this

Code: Select all

default Money = (["Money","item_1","[inventory.money]$"], image item_1 = "images/money.png")
but gives invalid syntax error. If I declare that image under the default then it works, is there any way to have it like I want to?

User avatar
PyTom
Ren'Py Creator
Posts: 15469
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:

Re: Invalid syntax

#2 Post by PyTom » Mon Dec 10, 2018 10:26 am

It's not clear what you are trying to do here.
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

SteelRazer
Newbie
Posts: 10
Joined: Thu Dec 06, 2018 12:25 pm
Contact:

Re: Invalid syntax

#3 Post by SteelRazer » Mon Dec 10, 2018 3:21 pm

I would like to declare the image in the brackets, if I do it like this it works:

Code: Select all

default Money = (["Money","item_1","[inventory.money]$"])
image item_1 = "images/money.png"
But if there isn't any workaround then I will do it like this.

User avatar
PyTom
Ren'Py Creator
Posts: 15469
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:

Re: Invalid syntax

#4 Post by PyTom » Tue Dec 11, 2018 12:29 am

Yes, the second example is valid, the first one is not.
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

Post Reply

Who is online

Users browsing this forum: Google [Bot], renardjap