I’m trying to create a delivery inventory system, in which the user when he buys something online, it takes certain amount of days to deliver
This is the class of my inventory:
Code: Select all
init python:
class Item:
def __init__(self, name, namees, picture, maxallowed, daysittakes, dayspassed, cost):
self.name = name
self.namees = namees
self.picture = picture
self.maxallowed = maxallowed
self.daysittakes = daysittakes
self.dayspassed = dayspassed
self.cost = cost
def passday(self, amount=1):
self.passday+= amount
if self.passday> daysittakes:
self.passday= daysittakes
Code: Select all
$ poolsupply = Item("Pool Supply", "Artículos de limpieza", "quimicos.png", 1, 5, 0, 150)
$ productssent.append(poolsupply)
$ countproductssent = len(productssent)
if countproductssent > 0:
for product in productssent:
if product.daysittakes = product.dayspassed:
$ productsdelivered.append(product)
$ productssent.remove(product)
else:
$ product.passday()
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/historias.rpy", line 3221: expected statement.
for product in productssent:
^
Ren'Py Version: Ren'Py 7.3.5.606
Mon Dec 28 18:32:37 2020
Thanks a lot