Search found 14 matches

by Andwiiger
Tue May 29, 2018 5:21 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

Re: Syntax for menu error, please help

Adding the return statement to the previous label block worked! Now everything works as intended, until the next mistake appears :P
by Andwiiger
Tue May 29, 2018 4:22 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

Re: Syntax for menu error, please help

Code: Select all

call name_accept(player_name, "the main character", "The Main Character", "player_name")
This is how I call it
by Andwiiger
Tue May 29, 2018 3:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

Re: Syntax for menu error, please help

https://imgur.com/a/OJPVpUE
Here's an image of the exception I get.
by Andwiiger
Tue May 29, 2018 3:32 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

Re: Syntax for menu error, please help

It still does the same thing, unfortunately. Goes through the code without problems, and then it gives me the exception of current_name has no value.
by Andwiiger
Tue May 29, 2018 3:03 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

Re: Syntax for menu error, please help

Ok so what I do is define a character and call the name_accept: $ player_name = renpy.input("Feel free to give him a name, or hit enter for default name \"Michael\"") $ player_name = player_name.strip() if (player_name == ""): $ player_name = "Michael" call na...
by Andwiiger
Tue May 29, 2018 2:30 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Exception error "required parameter current_name has no value" at the end of code
Replies: 3
Views: 1167

[Solved] Exception error "required parameter current_name has no value" at the end of code

I have a code that runs perfectly until the end, where I get an Exception: Required parameter current_name has no value. Here's the code: label name_accept(current_name, whatCharacter, capitalCharacter): $ new_name = "" "Do you want to name [whatCharacter] [current_name]?" menu: ...
by Andwiiger
Tue May 29, 2018 2:25 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

Re: Syntax for menu error, please help

Milkymalk and Kivik: Thanks alot to you both, I managed to make it work the way I wanted. The only problem I have is that I get an exception error required parameter current_name has no value at the end. The error only occurs when the rest of the code is done running, and it's the last thing before ...
by Andwiiger
Sat May 26, 2018 5:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Syntax for menu error, please help
Replies: 13
Views: 1073

[Solved] Syntax for menu error, please help

I'm trying to write something that allows the game to ask the player to accept or change the name of a character. Here's the code I have class Name_Accept(store.object): def __init__(self, current_name="", whatCharacter=""): self.current_name = current_name self.whatCharacter = w...
by Andwiiger
Mon May 21, 2018 11:30 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with conditional statement
Replies: 3
Views: 725

Re: Help with conditional statement

Ah that makes sense. Thanks alot. Do you happen to know how I can print the item name and cost with renpy.say? It gives me "AttributeError: 'NoneType' object has no attribute name" and "AttributeError:'NoneType object has no attribute cost". I tried to remove it and just use this...
by Andwiiger
Sun May 20, 2018 6:40 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with conditional statement
Replies: 3
Views: 725

[SOLVED] Help with conditional statement

I have a piece of code that runs but it doesn't print what happens when the condition is false. This is the text I can't get, it should come if self.money is lower than item.cost but it never shows. def buy(self, item): if (self.money >= item.cost): self.items.append(item) self.money -= item.cost el...
by Andwiiger
Sat May 19, 2018 7:33 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with code please
Replies: 6
Views: 687

Re: Help with code please

Sculpteur and Kivik: Thank you both for your answers.

Kivik: It makes perfect sense. Thanks alot for explaining how it works, I can follow along and understand what the code does. Your code was easy to understand, so I could make a few changes without causing problems.
by Andwiiger
Sat May 19, 2018 1:15 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with code please
Replies: 6
Views: 687

Re: Help with code please

Kivik: Your code makes alot of sense. I understand it and I've managed to use it the way I want it. Two little things I want to ask. Firstly I would like to change it so that the player get an increased bonus for each hour. Meaning that if they work 3 hours they get something like 10$ (1st hour) + 1...
by Andwiiger
Thu May 17, 2018 5:23 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with code please
Replies: 6
Views: 687

[SOLVED] Help with code please

I'm trying to make a salary system for a Visual Novel. The way I want it to work is that if the player works 1 hour then they get a set amount of money, but if they work more than 1 hour then they get a bonus. I've gotten it to work by entering it manually each time, but I would like to get a class ...