Jump to content

[Fixed] Story:_FindStartingTask has bug


Serpens
  • Pending

The last line of the function "function Story:_FindStartingTask(task_nodes)" within map/storygen is:

return #startTasks > 0 and startTasks[math.random(#startTasks)] or GetRandomItem(task_nodes).task

But I think the ".task" is wrong here, it should be:

return #startTasks > 0 and startTasks[math.random(#startTasks)] or GetRandomItem(task_nodes)

Cause when you only add a single task that is no starttask, the function GenerateNodesForRegion will raise a "index nil" error, since startingTask is nil.
Removing this ".task" solves the problem and game wont crash.

By the way, is it intended that this Story Class script does not return his class? That means I can not edit it with AddClassPostConstruct.


Steps to Reproduce
see above



User Feedback




Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...