How to print to Ren'py console

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
h333
Newbie
Posts: 2
Joined: Wed Jun 09, 2021 5:58 pm
Contact:

How to print to Ren'py console

#1 Post by h333 »

Hello, I have been very confused on how to use the Ren'py console and do not understand the documentation on the renpy page. I have 1 script.rpy file and three other .rpy files all of which help to create a dictionary in one of the files. I want to print the dictionary out to the console to see what is inside. However, I do not understand how. I tried shift + o to get to the console but afterward, when I tried to type print(the_dict) or simply the_dict in the console, I either get the invalid syntax of an undefined variable. Any help would be greatly appreciated. Thanks in advance.

User avatar
mavyxdawn
Regular
Posts: 72
Joined: Sun Dec 20, 2015 6:18 pm
Github: mavyxdawn
itch: zeillearnings
Discord: _zeil
Contact:

Re: How to print to Ren'py console

#2 Post by mavyxdawn »

This worked for me:
I have an instance variable called inventory

The console input:

Code: Select all

inventory
This also worked

Code: Select all

print inventory

It has an array items so I code this to check my array:

Code: Select all

inventory.items
YouTube: Zeil Learnings
itch.io: Zeil Learnings

Image

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]