code not working

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
PhantomHearted
Newbie
Posts: 1
Joined: Sun Jul 29, 2018 6:13 pm
Contact:

code not working

#1 Post by PhantomHearted » Sun Jul 29, 2018 6:19 pm

hi there so here is my code what am i doing wrong?


screen statsscreen1victor:
frame:
xalign 0.01 yalign 0.05
xminimum 220 xmaximum 220
vbox:
text "Saffire" size 22 xalign 0.5
null height 5
hbox:
bar:
xmaximum 130
value red_hood_hp
range red_hood_max_hp
left_gutter 0
right_gutter 0
thumb None
thumb_shadow None

null width 5

text "[red_hood_hp] / [red_hood_max_hp]" size 16


frame:
xalign 0.99 yalign 0.05
xminimum 220 xmaximum 220
vbox:
text "Victor" size 22 xalign 0.5
null height 5
hbox:
bar:
xmaximum 130
value wolf_hp
range wolf_max_hp
left_gutter 0
right_gutter 0
thumb None
thumb_shadow None

null width 5

text "[wolf_hp] / [wolf_max_hp]" size 16
text "Victor suddenly attacks"
return




this screen wont show up on command what did i do wrong? i got the original code from someone on here and it worked fine so whats wrong?

Ana
Regular
Posts: 61
Joined: Sun Oct 12, 2014 5:56 pm
Contact:

Re: code not working

#2 Post by Ana » Sun Jul 29, 2018 7:51 pm

It could be a lot of things, but the first thing I'd check is if it's indented right. From what you posted, it's impossible to tell if it was indented right. I'd use the code button to show that on these forums:

Code: Select all

[code]insert your code here[/code*]
And remove the *

From general screen use, you usually need to put it as "show screen xyz" for it to show in the actual game. This might be able to help.

edit: I think this should be moved to "Ren'Py Questions and Announcements"

Post Reply

Who is online

Users browsing this forum: _ticlock_