Search found 80 matches

by kankan
Sun Sep 23, 2012 6:17 am
Forum: Ren'Py Questions and Announcements
Topic: Menu help (using "if ___")
Replies: 2
Views: 504

Re: Menu help (using "if ___")

There's actually a few problems going on in that section. First off, when testing the value of a variable (like making sure will is True), you need to use two equal signs. One equal sign means you're setting a variable, two means you're looking for its value. And since at the parts in question you'r...
by kankan
Wed Sep 19, 2012 7:35 pm
Forum: Ren'Py Questions and Announcements
Topic: How do you use the On-Screen Inventory code?
Replies: 23
Views: 3698

Re: How do you use the On-Screen Inventory code?

rasburn wrote:

Code: Select all

if i < 0:
I instinctively feel this should be replaced by

Code: Select all

if i > 0:
but haven't tried the code. Am I wrong?
Yikes, I messed it up on accident. You're right, I'll fix it. Thanks!

And yep, this goes into the init section!
by kankan
Tue Sep 18, 2012 11:38 pm
Forum: Ren'Py Questions and Announcements
Topic: How do you use the On-Screen Inventory code?
Replies: 23
Views: 3698

Re: How do you use the On-Screen Inventory code?

Ohh, inventory codes, how fun! There's a few things that got left out of the explanation though; at the moment it looks like it would just cause a few errors instead of showing anything? init python: showitems = True # The inventory screen will pop up whenever this is True and hides # when it's Fals...
by kankan
Tue Sep 18, 2012 10:52 pm
Forum: Ren'Py Questions and Announcements
Topic: buttons, objects, and broken stuff [done]
Replies: 8
Views: 962

Re: 'int' object not callable- now: exec and inactive button

...Now I'm really going to make a wild shot in the dark (screen language, indeed), and guess that the 'action' property of button isn't getting defined, though I would think that 'clicked' would fill that. I'd make an example, but I honestly have no idea past what I can read in the docs. Using the p...
by kankan
Tue Sep 18, 2012 8:49 pm
Forum: Ren'Py Questions and Announcements
Topic: buttons, objects, and broken stuff [done]
Replies: 8
Views: 962

Re: "'int' object not callable" error

I don't think that's it; range can be called with one argument. You said the long list in system1 is the activeMessage.affect() part? So that would make activeMessage[0][indx] refer to one of the lists within that list... Err, it looks like you're trying to use 'clicked eval' on the second item in e...
by kankan
Tue Sep 18, 2012 12:50 am
Forum: Ren'Py Questions and Announcements
Topic: "ui.interact called w/ non-empty widget/stack" error (DONE)
Replies: 5
Views: 1324

Re: "ui.interact called w/ non-empty widget/stack" error

Ah, I was mistaken. The way I defined my function before made it call another Displayable, which a menu (I think) is not. You might be able to hard-code a menu into the screen or onto a layer above the screen (so you can 'scene' it with fewer problems), but it's a little hard to say given that...wel...
by kankan
Mon Sep 17, 2012 8:13 pm
Forum: Ren'Py Questions and Announcements
Topic: "ui.interact called w/ non-empty widget/stack" error (DONE)
Replies: 5
Views: 1324

Re: "ui.interact called w/ non-empty widget/stack" error

I'm pretty terrible at screen language, so I might be completely off the mark here. My guess is that you can't call a menu while on a screen, since screens are supposed to take user input too. Maybe you can try adding the function to the screen (with an 'add function()' statement)? I still doubt tha...
by kankan
Mon Sep 17, 2012 3:19 am
Forum: Ren'Py Questions and Announcements
Topic: Drawing shapes using code
Replies: 2
Views: 2367

Re: Drawing shapes using code

I guess it depends on your definition of the word "convenient," but yes, it's certainly possible to draw shapes. You're probably looking for canvas(), which can be used from an instance of the Displayable class within render. It somewhat matches the calls from pygame. So you can use it a b...
by kankan
Sun Sep 16, 2012 10:31 pm
Forum: Ren'Py Questions and Announcements
Topic: if statement in choice? (another question)
Replies: 7
Views: 883

Re: if statement in choice? (maybe)

Err...if I understand correctly, you want to have only two menus, where the options in the second menu change depending on the choice made in the first menu? You can do that with if statements if you really want to, but depending on how complicated the menus are it might be simpler to just separate ...
by kankan
Sat Sep 15, 2012 6:12 pm
Forum: Ren'Py Questions and Announcements
Topic: Class has not instance Function error
Replies: 6
Views: 874

Re: Class has not instance Function error

OH, GOT IT. Sorry, I just stared at this for a long time and couldn't find the error. You're altering the list size during iteration, so if there's an unsent text that fits those qualifications, it gets taken off unsentTexts too early. So say you have 3 unsent texts, and one gets sent. You're iterat...
by kankan
Sat Sep 15, 2012 3:06 am
Forum: Ren'Py Questions and Announcements
Topic: (Solved) Using "or" "and" with "if" statements
Replies: 3
Views: 633

Re: Using "or" "and" with "if" statements

Hey, nice to meet you too! Welcome to the boards. Umm, well in your first code, "if" shouldn't be capitalized. And this is more of a style preference of mine than actual Python requirements (I think?? I've always done it, so I've never really checked), but I find it easier to read if I put...
by kankan
Sun Sep 09, 2012 10:04 pm
Forum: Ren'Py Questions and Announcements
Topic: Two Coding Issues I'm Having [FIXED]
Replies: 15
Views: 2484

Re: Two Coding Issues I'm Having

Oh, see how when you define choice, it says

Code: Select all

$choice == "will"
? Make that one equal sign instead of two. Two signs means you're testing for equality, one sign means defining the variable.
by kankan
Sun Sep 09, 2012 9:22 pm
Forum: Ren'Py Questions and Announcements
Topic: Two Coding Issues I'm Having [FIXED]
Replies: 15
Views: 2484

Re: Two Coding Issues I'm Having

This is the code in question: menu: "Look at the paper" if choice == "will": "I look at the paper. One line occupies the page." "'To whom it may concern...'" "The rest is blank" "Don't look at the paper" if choice == "will": pass...
by kankan
Sun Sep 09, 2012 8:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Two Coding Issues I'm Having [FIXED]
Replies: 15
Views: 2484

Re: Two Coding Issues I'm Having

No, I'm pretty sure Darkmoonfire right. General rule of thumb is not to put colons in the middle of a statement. Not sure if technically this is how it works, but I'm guessing Ren'py is expecting some indented code directly after that colon, which "if choice == will" is not. Hence that err...
by kankan
Sun Sep 09, 2012 5:17 am
Forum: Ren'Py Questions and Announcements
Topic: Two Coding Issues I'm Having [FIXED]
Replies: 15
Views: 2484

Re: Two Coding Issues I'm Having

You should probably post coding questions in the Questions and Announcements board, as more people will see it over there than in the Writing section. And CaseyLoufek is right, it's pretty hard to tell what's going on without the error messages. For the indentation, the general rule is that if there...