Idle error

SeniGaming

Active Member
Game Developer
Sep 8, 2019
579
565
Hi, I have a problem with this code....

Code:
screen bunnyfriends01():
    add "bunnyfriends01"
    imagebutton auto "buttonclose_%s.png" action Hide("bunnyfriends01"):
        xalign 0.99
        yalign 0.02

In game, I get an error telling me that the buttonclose image haven't *idle*, but still I created the idle and selected_idle image, as well as hover and selected_hover

I checked the spelling, everything's fine.

I don't understand where this bug came from, why I can't hide this image?

thank you!
 

9thCrux

--Waifu maker--
Game Developer
Oct 22, 2017
844
3,221
Hi, I have a problem with this code....

Code:
screen bunnyfriends01():
    add "bunnyfriends01"
    imagebutton auto "buttonclose_%s.png" action Hide("bunnyfriends01"):
        xalign 0.99
        yalign 0.02

In game, I get an error telling me that the buttonclose image haven't *idle*, but still I created the idle and selected_idle image, as well as hover and selected_hover

I checked the spelling, everything's fine.

I don't understand where this bug came from, why I can't hide this image?

thank you!
Don't you have to specify the whole image path? I think you need to define in which folder is the buttonclose located.
Specially if you have custom folders.

Like here:
Python:
imagebutton auto "0.01a/Nav/Sch/Clr/cr2etc_%s.png" xpos 0 ypos 0 focus_mask True action Hide("clsr2"), Show("clsr4")
 
  • Like
Reactions: SeniGaming

SeniGaming

Active Member
Game Developer
Sep 8, 2019
579
565
Thank you, I actually put the image in another folder....
as usual I ask for help because I don't pay attention to what I do.

in good resolution for 2020, I'm going to ask myself stop doing nonsense.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,369
15,285
in good resolution for 2020, I'm going to ask myself stop doing nonsense.
For Christmas, offer a rubber duck vibrator to you girlfriend/wife. It will make both of you happy. She'll use it while testing your game, and you'll borrow it for .


More seriously, as stupid as it can look, rubber duck debugging is a method that really works ; it can even be used with everything, including pets and humans. The simple fact to have to express your though by words, and to have to explain what you want to achieve like if the other know absolutely nothing about coding, help you to have a better view of the problem and to find more easily what you've missed.
 

SeniGaming

Active Member
Game Developer
Sep 8, 2019
579
565
For Christmas, offer a rubber duck vibrator to you girlfriend/wife. It will make both of you happy. She'll use it while testing your game, and you'll borrow it for .


More seriously, as stupid as it can look, rubber duck debugging is a method that really works ; it can even be used with everything, including pets and humans. The simple fact to have to express your though by words, and to have to explain what you want to achieve like if the other know absolutely nothing about coding, help you to have a better view of the problem and to find more easily what you've missed.

Okay, I'm going to buy a duck.
Do I have to pluck it before use it?