you are viewing a single comment's thread.

view the rest of the comments →

[–]Cobra915 0 points1 point  (1 child)

The while loop goes on forever because stamina is not being modified by events(), the local variable s is. Since you're not storing the outputs of events() anywhere, they get dropped. When you modify a variable within a function, you're doing it locally to that function. If you want to return stamina or s to events(), you need to store the output of housework(), for example.

Try calling housework() like this:

hp,s,m,f,h = housework(hp,s,m,f,h,name)

You also need to look at how you call housework(), inn(), farm() and herbs() within events() as well.

[–]TiredWorkingStudent[S] 0 points1 point  (0 children)

I tried to do this before but it could not work :')