- Sep 26, 2018
- 3,130
- 3,194
EDIT: I got it to work some how
trying to make a task list so player can keep track on what to do but getting a error
here is my code
trying to make a task list so player can keep track on what to do but getting a error
here is my code
Code:
init python:
import renpy.store as store
import renpy.exports as renpy
class Task(store.object):
list = []
def __init__(self, name):
self.name = name
self.done = False
self.fail = False
self.on = False
self.get = False
Task.list.append(self)
label tasks_list:
python:
learn_admission = Task(_("Learn about college admission"))
learn_massage = Task(_("Learn how to do a massage"))
TASK = Task.list
label after_load:
python:
TASK = [learn_admission,
learn_massage]
label addtsk(task):
if task.get:
$ task.on = True
$ task.get = True
tip "[ntsk!t][tsk.name!t][col]" with dissolve
return
Code:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/core/script.rpy", line 61, in script call
call addtsk (learn_admission)
File "game/core/task_core.rpy", line 25, in script call
label addtsk(task):
File "game/core/task_core.rpy", line 25, in script
label addtsk(task):
Exception: Required parameter task has no value.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/core/script.rpy", line 61, in script call
call addtsk (learn_admission)
File "game/core/task_core.rpy", line 25, in script call
label addtsk(task):
File "game/core/task_core.rpy", line 25, in script
label addtsk(task):
File "R:\renpy\renpy-7.4.6-sdk/renpy/ast.py", line 864, in execute
values = apply_arguments(self.parameters, renpy.store._args, renpy.store._kwargs)
File "R:\renpy\renpy-7.4.6-sdk/renpy/ast.py", line 159, in apply_arguments
return parameters.apply(args, kwargs, ignore_errors)
File "R:\renpy\renpy-7.4.6-sdk/renpy/ast.py", line 123, in apply
raise Exception("Required parameter %s has no value." % name)
Exception: Required parameter task has no value.
Windows-10-10.0.19041
Ren'Py 7.4.8.1895
Progerialust_Family V1
Wed Aug 11 02:27:02 2021
Last edited: