Ren'Py Inventory problem for returning value

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
Ok, so this is a code that i found on the internet. Ze Internet.:LOL:

It's very simple and suits what i want to do.
All it has to do is to give an option (buy) and added it to the inventory. I don't want to make it too complicated for myself and the player.
So no shiny objects and stuff.

So this is using classes and i just can't figure out how to display what is left from the money.
All i see is class.blabla at location... if i use the console.

So there is surely an error that i make how to display that number.
Of course i use what i know which is "you have [money] left but this probably won't fit since it's a class.:unsure:

Code:
#script.rpy
init python:#declare a python black so we can write python code
    class resource:#this is a convenience class for handling resources
        def __init__(self, starting_amount):
            self.level = starting_amount
        def dec(self):
            if self.level > 0: self.level = self.level - 1

        def inc(self): self.level = self.level + 1


default coffee = resource(0)

#label.whatever
   menu coffeeshop01:

        "Coffee?" if money.level >= 1:
            "You purchase a coffee."
            "You have {self.money} left."

            $money.dec()
            $beverage = resource(1)
        "You don't have enough money" if money.level < 1:
            "You sitting without a coffee at the table."
            "Maybe you should get a job?"
I seen some inventory systems but i don't know anything about it, lesser the code itself and it look rather daunting to me.
So i like to still have an inventory system but simple. It shouldn't get in the way for gaming.
But i like to have the MC (player) think how to spend money and if short on money, to do something.

Anyway, that's my question.
(i am sure there is a "oh no, another inventory question.".. o_O
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,966
16,214
Code:
    class resource:#this is a convenience class for handling resources
Why ?

Python:
default money = 0

label whatever:
   menu :
        "Coffee?" if money >= 1:
            "You purchase a coffee."
            "You have [money] left."
            $ money -= 1

        "You don't have enough money" if not money >= 1:
            "You sitting without a coffee at the table."
            "Maybe you should get a job?"

label payDay:
    "Wow, I had a raise."
    $ money += 500
Of course, the use of a class permit to have the dec() method that ensure you'll not have negative amount of money. But if you condition the buying by if money >= cost, you already know that the player have enough and will not end with a negative value.

And when the money is spent because of an indirect action, just use a regular if:
Python:
default yesMovie = False

label whatever:
    girl "Let's go to the movie tomorrow." 
    if money >= 10:
        $ yesMovie = True
        mc "Ok, why not"
        [...]
    else:
        #  Implicit due to the default value.
        #$ yesMovie = False
        mc "Well, I don't have enough money, sorry."
        [...]

label tomorrow:
    [...]
    if not yesMovie:
        jump borringAfternoon
    else:
        "you go to the movie"
        $ money -= 10

This being said:
Code:
       "Coffee?" if money.level >= 1:
            "You purchase a coffee."
            "You have {self.money} left."
1) {something} is for the text tags (bold, italic, etc). Text interpolation are done with [variable].
2) self is only relevant in the class itself. You used money.level to know if the player have enough money, you can also use it to show how much money he have:
Python:
       "Coffee?" if money.level >= 1:
            "You purchase a coffee."
            "You have [money.level] left."
 
  • Hey there
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
Why ?

Python:
default money = 0

label whatever:
   menu :
        "Coffee?" if money >= 1:
            "You purchase a coffee."
            "You have [money] left."
            $ money -= 1

        "You don't have enough money" if not money >= 1:
            "You sitting without a coffee at the table."
            "Maybe you should get a job?"

label payDay:
    "Wow, I had a raise."
    $ money += 500
Of course, the use of a class permit to have the dec() method that ensure you'll not have negative amount of money. But if you condition the buying by if money >= cost, you already know that the player have enough and will not end with a negative value.

And when the money is spent because of an indirect action, just use a regular if:
Python:
default yesMovie = False

label whatever:
    girl "Let's go to the movie tomorrow."
    if money >= 10:
        $ yesMovie = True
        mc "Ok, why not"
        [...]
    else:
        #  Implicit due to the default value.
        #$ yesMovie = False
        mc "Well, I don't have enough money, sorry."
        [...]

label tomorrow:
    [...]
    if not yesMovie:
        jump borringAfternoon
    else:
        "you go to the movie"
        $ money -= 10

This being said:


1) {something} is for the text tags (bold, italic, etc). Text interpolation are done with [variable].
2) self is only relevant in the class itself. You used money.level to know if the player have enough money, you can also use it to show how much money he have:
Python:
       "Coffee?" if money.level >= 1:
            "You purchase a coffee."
            "You have [money.level] left."
Thank you so much, Anne.

I feel a little...well..

Ok, i could have seen it but i was blind.
It seems so easy in retrospect but i did not see it.

Yes, this should do it. I will try it out later.
Like i said, all it supposed to do is purchasing some items and use them.
Just enough to keep the game interesting enough and not just a story. Though a story is good but i believe if the player can become active it will raise the enjoyment.

money.level. Oh my... this is what i should have seen. Ok, so i hope i have it in my head for next time.

Thank you again.

p.s. after further reading it, i'll get it.
If i would just use $ money -= 10 it would be actually enough.
Maybe i was overthinking the whole thing then.
Anyway, changing to money.level did work. So that was the thing i should have know and seen.
Something learned again.

Thanks again.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,966
16,214
Ok, i could have seen it but i was blind.
It seems so easy in retrospect but i did not see it.
You weren't blind, you debut in all this, it's not the same. It's something you don't know and that people tell to be complex, so you searched a solution to what you thought to be complex.
It's complex sometimes, but not always, and you should always starts by searching the easiest way to solve your issue. It's not always possible, and sometimes what seem easier at first can become too complex, but "the simplest way" is generally the best one.


Like i said, all it supposed to do is purchasing some items and use them.
Just enough to keep the game interesting enough and not just a story. Though a story is good but i believe if the player can become active it will raise the enjoyment.
Then, do you really need a full inventory system ?

/!\ Wrote on the fly at past 2AM /!\
Python:
init python:
    class Item( renpy.python.RevertableObject ):
        def __init__( self, name, cost, image ):
            # Name of the item.
            self.name = name
            # How much it cost to buy one.
            self.cost = cost
            # Path+name of the image representing the item.
            self.image = image
            # How many do the player have. It starts with 0.
            self.count = 0

        # Buy this item "count" times.
        def buy( self, count ):
            # If the player don't own at least one time this item...
            if not self in store.inventory:
                # reset the count by security...
                self.count = 0
                # then add it to the inventory.
                store.inventory.append( self )

            #  Add 'count' number of 'this item' to the number of
            # "this item' already in the inventory.
            self.count += count

            #  Remove the money.
            store.money -= count * self.cost

        # Use the item "count" time.
        def use( self, count ):
            #  Remove 'count' number of 'this item' from the number of
            # 'this item' in the inventory.
            self.count -= count

            #  If there's now 0 time 'this item', remove the item from
            # the inventory.
            if self.count == 0:
                store.inventory.remove( self )

        # Can the player buy the item "count" time.
        def canBuy( self, count ):
            #  He can buy it if he have more money than the price of
            # "count" time this item.
            return store.money >= count * self.cost

        # Can the player use the item "count" time.
        def canUse( self, count ):
            #  He can use it if he have the item in his inventory and
            # at least "count" time.
            return self in store.inventory and self.count >= count

# The amount of money owned by the MC.
default money = 0
# The player inventory.
default inventory = []
# The beer item.
default beer = Item( "beer", 5, "images/items/beer.png" )
# The flower item.
default flower = Item( "Flower", 3, "images/items/flower.png" )

screen inventory:

    # Index of the item to display.
    $ idx = 0

    vbox:
        # 16 entry inventory
        grid 4 4:
            # If there's an item at this index...
            if idx < len( inventory ):
                # display it.
                vbox:
                    add inventory[idx].image
                    text "You have [inventory[idx].count] [inventory[idx].name]"
            # If there's no more items...
            else:
                # display an empty slot.
                add "images/items/nothing.png"

        textbutton "close":
            action Return()

label whatever:

    menu:
        # If there's at least one flowers in the inventory.
        "Give her some flowers" if flower.canUse( 1 ):
            MC "It's for you."
            # The MC used one flower.
            $ flower.use( 1 )
        # If there's at least 2 beers in the inventory.
        "Be rebel, share a beer with her" if beer.canUse( 2 ):
            MC "Cheer."
            # The MC used two beers.
            $ beer.use( 2 )

# Can be a screen, I use a label for the example.
label store:
    menu:
        # If the player have enough to buy some flowers.
        "Buy a flower bouquet" if flower.canBuy( 1 ):
            $ flower.buy( 1 )
        # If the player have enough to buy a pack of beer.
        "Buy a pack of beer (6)" if beer.canBuy( 6 ):
            $ beer.buy( 6 )
Big inventory systems with classes and all are for RPG-like games that have a bunch of items that can be used in many situation. Then, yes, you need something complex with a lot of information and some security code. But if really your game will only have few items to spice it a bit, you don't really need something more advanced that what I wrote above.


Edit: One ":" missing in a method declaration, and a forgotten variable declaration.
 
Last edited:

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
You weren't blind, you debut in all this, it's not the same. It's something you don't know and that people tell to be complex, so you searched a solution to what you thought to be complex.
It's complex sometimes, but not always, and you should always starts by searching the easiest way to solve your issue. It's not always possible, and sometimes what seem easier at first can become too complex, but "the simplest way" is generally the best one.




Then, do you really need a full inventory system ?

/!\ Wrote on the fly at past 2AM /!\
Python:
init python:
    class Item( renpy.python.RevertableObject ):
        def __init__( self, name, cost, image ):
            # Name of the item.
            self.name = name
            # How much it cost to buy one.
            self.cost = cost
            # Path+name of the image representing the item.
            self.image = image
            # How many do the player have. It starts with 0.
            self.count = 0

        # Buy this item "count" times.
        def buy( self, count ):
            # If the player don't own at least one time this item...
            if not self in store.inventory:
                # reset the count by security...
                self.count = 0
                # then add it to the inventory.
                store.inventory.append( self )

            #  Add 'count' number of 'this item' to the number of
            # "this item' already in the inventory.
            self.count += count

            #  Remove the money.
            store.money -= count * self.cost

        # Use the item "count" time.
        def use( self, count )
            #  Remove 'count' number of 'this item' from the number of
            # 'this item' in the inventory.
            self.count -= count

            #  If there's now 0 time 'this item', remove the item from
            # the inventory.
            if self.count == 0:
                store.inventory.remove( self )

        # Can the player buy the item "count" time.
        def canBuy( self, count ):
            #  He can buy it if he have more money than the price of
            # "count" time this item.
            return store.money >= count * self.cost

        # Can the player use the item "count" time.
        def canUse( self, count ):
            #  He can use it if he have the item in his inventory and
            # at least "count" time.
            return self in store.inventory and self.count >= count


# The player inventory
default inventory = []
# The beer item
default beer = Item( "beer", 5, "images/items/beer.png" )
# The flower item
default flower = Item( "Flower", 3, "images/items/flower.png" )

screen inventory:

    # Index of the item to display.
    $ idx = 0

    vbox:
        # 16 entry inventory
        grid 4 4:
            # If there's an item at this index...
            if idx < len( inventory ):
                # display it.
                vbox:
                    add inventory[idx].image
                    text "You have [inventory[idx].count] [inventory[idx].name]"
            # If there's no more items...
            else:
                # display an empty slot.
                add "images/items/nothing.png"

        textbutton "close":
            action Return()

label whatever:

    menu:
        # If there's at least one flowers in the inventory.
        "Give her some flowers" if flower.canUse( 1 ):
            MC "It's for you."
            # The MC used one flower.
            $ flower.use( 1 )
        # If there's at least 2 beers in the inventory.
        "Be rebel, share a beer with her" if beer.canUse( 2 ):
            MC "Cheer."
            # The MC used two beers.
            $ beer.use( 2 )

# Can be a screen, I use a label for the example.
label store:
    menu:
        # If the player have enough to buy some flowers.
        "Buy a flower bouquet" if flower.canBuy( 1 ):
            $ flower.buy( 1 )
        # If the player have enough to buy a pack of beer.
        "Buy a pack of beer (6)" if beer.canBuy( 6 ):
            $ beer.buy( 6 )
Big inventory systems with classes and all are for RPG-like games that have a bunch of items that can be used in many situation. Then, yes, you need something complex with a lot of information and some security code. But if really your game will only have few items to spice it a bit, you don't really need something more advanced that what I wrote above.
Oh my, you didn't had to do that.
I feel bad now.

That is a great idea. (your code)

Classes are somewhat new to me. It takes a while to digest it and to comprehend.
But it seem you can do more with it than just what i had in mind.

I'll give you a quick overview what i had in my mind.

First, something really simple.
Buying a coffee or not.

The code i used didn't offer a choice of not buying so i made it additionally.
At least i can do that now.

I don't want to over complicate things. I essence it should give the player the option to buy thing that are needed for the game. Though they may not be needed if the player desires to keep the protagonist where it is.
I played a couple of games where you had specific items and sometimes that wasn't easy. It should mainly enhance the gameplay but also offer a solution to some situations. It should not take over the game. After all, it's a story.

Some things the player will get anyway as there is no choice. But for everything else there should be a choice.

So let me try out that code of yours and see what it does. I am excited.

Coding is really something to be learned.
I bought me some time ago Python for Dummies. So that i can understand that language. Though i haven't made real progress so far.
I will still continue to learn from the code that is used as examples in the book. Classes are definitely advanced and so i am trying to avoid it as the understanding is not without.

Recently i contemplated if i should just use a different game engine but RenPy is so popular that it doesn't make sense. And my game is basically now made to run on it anyway.
Besides, i got kind of used now. The editor, the language etc.. it is becoming more familiar.
And, for some reason Python reminds me sometimes of Basic of the old. Sometimes.
It just takes me as a none coder way longer to get it.

Thanks for helping. I really appreciate that.
 

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,130
3,194
I would suggest to look at My Cute Roommate & bright past Inventory system or other games that they use maybe they give you a better idea what to do what you have showed won't do nothing but show what you have or not and I would put a class in it's own page not with the script.rpy file.
anne O'nymous suggest as well
 
  • Like
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
I would suggest to look at My Cute Roommate & bright past Inventory system or other games that they use maybe they give you a better idea what to do what you have showed won't do nothing but show what you have or not and I would put a class in it's own page not with the script.rpy file.
anne O'nymous suggest as well
I will.

But for some reason i think that goes beyond i can accomplish. Or rather what i want to have.
Nevertheless, i will take a look at that game and see how it's done there. Maybe it's something i am looking for.
 

rayminator

Engaged Member
Respected User
Sep 26, 2018
3,130
3,194
I will.

But for some reason i think that goes beyond i can accomplish. Or rather what i want to have.
Nevertheless, i will take a look at that game and see how it's done there. Maybe it's something i am looking for.
well that depends on if you are using python 2 or python 3 if you are using python 2 then I would go for what suggest to use what My Cute Roommate is using
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
well that depends on if you are using python 2 or python 3 if you are using python 2 then I would go for what suggest to use what My Cute Roommate is using
I checked, its 3. I just recently updated. Though i am not sure what that actually means. Man, i am air headed.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,966
16,214
Oh my, you didn't had to do that.
I feel bad now.
There's no need, really.
I'm 51yo, I had my first computer I should be around 12yo or something like that, and I started to code few weeks after that, never stopped since. With a so long experience, and obviously when it's something relatively basic, writing lines of code come as easily than writing in my native language ; and more easily than writing in English.
As I implied few days ago on another thread, there's people who do crosswords to release some tension, for me it's writing code that works.
So, instead of feeling bad, be happy, you offered me an opportunity to remove some stress ;)


Coding is really something to be learned.
I bought me some time ago Python for Dummies. So that i can understand that language. Though i haven't made real progress so far.
Learning to code isn't really different from learning a new language, especially if it's one really different from you native language. It need time before you start to see your progress, because you firstly need to learn, understand, then assimilate, a bunch of new concepts. Then when it's done, you'll generally see your progress only by looking back to what you could do months/years ago, in regard of what you can do nowadays.
So don't desperate, you're learning, even if it don't seem so. And, it's important, never believe that professionals know everything by heart. I can write the code above because I wrote similar structures hundred times before, but when it's something I'm less used to code I've the documentation opened, and will often take a look at it because I don't remember how "this" works.


Recently i contemplated if i should just use a different game engine but RenPy is so popular that it doesn't make sense.
Ren'Py is popular mostly because it's something both really easy to use and really powerful. So, using a different engine wouldn't have helped you. Either you would have been more limited, or it would have been more difficult for you.


And, for some reason Python reminds me sometimes of Basic of the old. Sometimes.
What isn't too surprising.
BASIC was originally created to open students from different fields to the use of computer. Therefore it's a language generic enough to have many purposes, and easy enough to be usable by people who know nothing about computers.
And Python is not really different since it's a language designed to teach programming. It focus on the readability of the code, in order to be usable by people who know nothing about computers. It's a language more powerful, because created near to 30 years after BASIC, but not necessarily more complex.
 
  • Hey there
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
There's no need, really.
I'm 51yo, I had my first computer I should be around 12yo or something like that, and I started to code few weeks after that, never stopped since. With a so long experience, and obviously when it's something relatively basic, writing lines of code come as easily than writing in my native language ; and more easily than writing in English.
As I implied few days ago on another thread, there's people who do crosswords to release some tension, for me it's writing code that works.
So, instead of feeling bad, be happy, you offered me an opportunity to remove some stress ;)
Now then i am relieved.
I went through the usual computer generation.
C64, Amiga, PC.
What i loved about the C64 was the build Basic. At that time you had to do something to have to computer make something. So i did the listings in the magazines. I remember a Tron clone that i typed in. It was pretty cool.
Later on the Amiga i did some Arexx. I am sure no one knows that anymore. So i did a little but my interest shifted. Though what remained was the computer. Mostly for office applications and games of course. I was rather passive my whole life.
To me, even with all the graphical shortcomings of the computers of old, it was more fun. You were more engaged.

Yes, the learning part is probably the same as any other skill you will obtain.
Though i can be scary at times and i am in to learn more as time permits.

I am 57 now. So i am not exactly quick anymore. Sometimes i sit in front of the code and don't see what's wrong. It takes me longer to see what i did.
Anyway, it's alright. With Python you can do so many things. It seems only your imagination is the limit really.


As for RenPy as a game engine. Probably true. I see it as what is popular and clearly RenPy is the winner. Not judging on technical terms as i know to little about it.
When i started i was thinking about RPGM. But, it cost money. Not that this would be a bad thing but it isn't really new either. Though i did not delve to deep into it but it seemed easier. Just my perception.

Basic.
I loved Basic. I think it was a great language and almost anyone could do something with it.
It should be included onto every computer or OS. Well, now you got Python or other languages that are free. Before you had to pay for it.
But to get people like me interested, well, Gaming helps like with a VN.
And if you think about it, it's actually rather easy to create a game. Regardless if its utter trash or a smashing hit. At least compared to real games where you have to make everything.

So even though i don't know much yet, i hope i can advance to the next level.
In the meantime i will keep it simple.

Thanks again
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
You weren't blind, you debut in all this, it's not the same. It's something you don't know and that people tell to be complex, so you searched a solution to what you thought to be complex.
It's complex sometimes, but not always, and you should always starts by searching the easiest way to solve your issue. It's not always possible, and sometimes what seem easier at first can become too complex, but "the simplest way" is generally the best one.




Then, do you really need a full inventory system ?

/!\ Wrote on the fly at past 2AM /!\
Python:
init python:
    class Item( renpy.python.RevertableObject ):
        def __init__( self, name, cost, image ):
            # Name of the item.
            self.name = name
            # How much it cost to buy one.
            self.cost = cost
            # Path+name of the image representing the item.
            self.image = image
            # How many do the player have. It starts with 0.
            self.count = 0

        # Buy this item "count" times.
        def buy( self, count ):
            # If the player don't own at least one time this item...
            if not self in store.inventory:
                # reset the count by security...
                self.count = 0
                # then add it to the inventory.
                store.inventory.append( self )

            #  Add 'count' number of 'this item' to the number of
            # "this item' already in the inventory.
            self.count += count

            #  Remove the money.
            store.money -= count * self.cost

        # Use the item "count" time.
        def use( self, count )
            #  Remove 'count' number of 'this item' from the number of
            # 'this item' in the inventory.
            self.count -= count

            #  If there's now 0 time 'this item', remove the item from
            # the inventory.
            if self.count == 0:
                store.inventory.remove( self )

        # Can the player buy the item "count" time.
        def canBuy( self, count ):
            #  He can buy it if he have more money than the price of
            # "count" time this item.
            return store.money >= count * self.cost

        # Can the player use the item "count" time.
        def canUse( self, count ):
            #  He can use it if he have the item in his inventory and
            # at least "count" time.
            return self in store.inventory and self.count >= count


# The player inventory
default inventory = []
# The beer item
default beer = Item( "beer", 5, "images/items/beer.png" )
# The flower item
default flower = Item( "Flower", 3, "images/items/flower.png" )

screen inventory:

    # Index of the item to display.
    $ idx = 0

    vbox:
        # 16 entry inventory
        grid 4 4:
            # If there's an item at this index...
            if idx < len( inventory ):
                # display it.
                vbox:
                    add inventory[idx].image
                    text "You have [inventory[idx].count] [inventory[idx].name]"
            # If there's no more items...
            else:
                # display an empty slot.
                add "images/items/nothing.png"

        textbutton "close":
            action Return()

label whatever:

    menu:
        # If there's at least one flowers in the inventory.
        "Give her some flowers" if flower.canUse( 1 ):
            MC "It's for you."
            # The MC used one flower.
            $ flower.use( 1 )
        # If there's at least 2 beers in the inventory.
        "Be rebel, share a beer with her" if beer.canUse( 2 ):
            MC "Cheer."
            # The MC used two beers.
            $ beer.use( 2 )

# Can be a screen, I use a label for the example.
label store:
    menu:
        # If the player have enough to buy some flowers.
        "Buy a flower bouquet" if flower.canBuy( 1 ):
            $ flower.buy( 1 )
        # If the player have enough to buy a pack of beer.
        "Buy a pack of beer (6)" if beer.canBuy( 6 ):
            $ beer.buy( 6 )
Big inventory systems with classes and all are for RPG-like games that have a bunch of items that can be used in many situation. Then, yes, you need something complex with a lot of information and some security code. But if really your game will only have few items to spice it a bit, you don't really need something more advanced that what I wrote above.
Oh, there was an error that came up.
Though i am not understanding the error as the code has similar lines.

Code:
While running game code:
  File "game/coffeeshop.rpy", line 41, in script
    menu:
  File "game/coffeeshop.rpy", line 43, in <module>
    "Buy a flower bouquet" if flower.canBuy( 1 ):
  File "game/script.rpy", line 250, in canBuy
    return store.money >= count * self.cost
TypeError: '>=' not supported between instances of 'Item' and 'int'
I pretty much left the code like it was.
Not sure why you can't use '>='?

I am running RenPy 8.0.3. Not sure if that has anything to do with it.
I will read on the documentation. Maybe i will find it. :)
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,966
16,214
Code:
    return store.money >= count * self.cost
TypeError: '>=' not supported between instances of 'Item' and 'int'
I pretty much left the code like it was.
Well, the error is telling that money is an Item object, while it should be the integer I presented previously ; it's partly my fault, I haven't declared it in the second code.


I am running RenPy 8.0.3. Not sure if that has anything to do with it.
I haven't tested it with the 8.x branch, but did a quick test with the 7.4.x one, and it works. At first glance there isn't Python 3.x incompatible code, therefore it should works with both.
 
  • Like
Reactions: coffeeaddicted

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,825
1,481
Well, the error is telling that money is an Item object, while it should be the integer I presented previously ; it's partly my fault, I haven't declared it in the second code.




I haven't tested it with the 8.x branch, but did a quick test with the 7.4.x one, and it works. At first glance there isn't Python 3.x incompatible code, therefore it should works with both.
Sounds good. I will take a look over the weekend.
I thought the error was rather strange. So that makes of course sense.
Thanks