A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
-
thexerox123
- Regular
- Posts: 140
- Joined: Fri Jan 20, 2023 3:21 pm
- itch: thexerox123
-
Contact:
#76
Post
by thexerox123 »
Ended up having an issue when I tried to implement crafting and recipes, but it was solved via
this other thread. (thanks to _ticlock_!)
In short, I was getting the error
Code: Select all
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
It's solved by making a slight change to def qty:
Code: Select all
def qty(self, item):
for i in self.inv:
if i[0] == item:
return i[1] # returns quantity
return 0 # returns zero if no item in the inventory
Users browsing this forum: No registered users